-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Index Maintenance
-
Labels:
-
ALL
-
Execution Team 2020-12-14
Bad bit shift operation
The operation may have an undefined behavior or yield an unexpected result. A bit shift operation has a shift amount which is too large or has a negative value.
/src/mongo/db/storage/key_string.cpp:693: BAD_SHIFT 114295 Function call "mongo::countLeadingZeros64(integerPart << 1)" may return 64.
/src/mongo/db/storage/key_string.cpp:693: BAD_SHIFT 114295 Assigning: "fractionalBytes" = "mongo::countLeadingZeros64(integerPart << 1) / 8". The value of "fractionalBytes" is now 8.
/src/mongo/db/storage/key_string.cpp:707: BAD_SHIFT 114295 In expression "integerPart + 1UL << fractionalBytes * 8UL", left shifting by more than 63 bits has undefined behavior. The shift amount, "fractionalBytes * 8UL", is 64.