-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Fully Compatible
-
ALL
-
Execution Team 2024-06-10
-
0
Our ABUSAN CI builder recently flagged how NaN values are handled by the test-only captrunc command when parsing the n argument:
src/mongo/bson/bsonobj.cpp:711:32: runtime error: nan is outside the range of representable values of type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mongo/bson/bsonobj.cpp:711:32 in
Since zero is not an allowed value for this test command, it should be fine to use BSONElement::safeNumberInt() for this parameter.