Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ubsan: shift exponent is too large
When running libzpool with the Undefined Behavior Sanitizer (ubsan) enabled, a zpool create causes a run-time error: module/zfs/vdev_label.c:600:14: runtime error: shift exponent 64 is too large for 64-bit type 'long long unsigned int'` in vdev_config_generate() Fix is to convert vdev_removal_max_span to its base-2 logarithm, using highbit64(), and then compare the "shifts". Fixes #9744 Signed-off-by: Chuck Tuffli <[email protected]>
- Loading branch information