[SERVER-10490] SafeNum int32/int32 and int64/int64 internal addition routines rely on undefined behavior Created: 12/Aug/13 Updated: 11/Jul/16 Resolved: 20/Aug/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
In safe_num.cpp, the addInt32Int32 and addInt64Int64 routines incorrectly assume meaningful outcomes from signed integer overflow, which is actually undefined behavior. |
| Comments |
| Comment by auto [ 20/Aug/13 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}Message: |
| Comment by auto [ 20/Aug/13 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}Message: |