[SERVER-23966] Fix UB in decimal128_test Created: 28/Apr/16  Updated: 16/May/16  Resolved: 02/May/16

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 3.3.5
Fix Version/s: 3.3.6

Type: Bug Priority: Minor - P4
Reporter: Geert Bosch Assignee: Geert Bosch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Run unittests with UBSAN

Participants:
Linked BF Score: 0

 Description   

src/mongo/platform/decimal128_test.cpp:868:5: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself



 Comments   
Comment by Githook User [ 02/May/16 ]

Author:

{u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert@mongodb.com'}

Message: SERVER-23966 Fix negation of lowest signed int
Branch: master
https://github.com/mongodb/mongo/commit/dddfdb8e4a2adf1c0b529a88b53a4d37389ba66f

Generated at Thu Feb 08 04:04:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.