diff options
author | Chuck Tuffli <[email protected]> | 2020-10-08 16:37:27 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-10-16 13:00:44 -0700 |
commit | 0df5b5737c124d06f31721e2f09cc3dc7c5c87ad (patch) | |
tree | 4e2bd787ca745551c3c661bcede23f315044f74c /tests | |
parent | 102a1db6b24f0c5b20e0ed7157b8945c5ef4da34 (diff) |
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".
Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Chuck Tuffli <[email protected]>
Closes #9744
Closes #11024
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions