[SERVER-23713] Aggregation numeric ops rely on undefined signed overflow and numeric coercion Created: 14/Apr/16  Updated: 28/Sep/16  Resolved: 06/Jun/16

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 3.3.5

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Geert Bosch
Resolution: Done Votes: 0
Labels: undefined-sanitizer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-8920 Aggregation numeric ops rely on undef... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Steps To Reproduce:

Run the aggregation unit tests under the undefined behavior sanitizer. Note that we are planning to blacklist these files from UBSAN, so you may need to remove the entries from the etc/ubsan.blacklist file and force a recompile.

Participants:

 Description   

There are several errors in the Expression and Accumulators for numeric operations that are exposed when running the tests under the undefined behavior sanitizer.



 Comments   
Comment by Geert Bosch [ 06/Jun/16 ]

This is solved by SERVER-19735. Aggregations will no longer overflow or wrap around, but instead compute the accurate result and return a double precision floating point value if the number is out of range for a 64-bit integer.

Comment by Githook User [ 15/Apr/16 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-16221 SERVER-23713 Blacklist subset of aggregation that has numeric UB
Branch: master
https://github.com/mongodb/mongo/commit/5b177d096afbf77d322cbdbba5b9b5db075ca92c

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