Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
3.6.13, 4.0.10, 4.2.0-rc2
-
None
-
Fully Compatible
-
ALL
-
v4.2, v4.0, v3.6
-
Dev Tools 2019-07-15, Dev Tools 2019-07-29
-
(copied to CRM)
Description
If this line throws, e.g. due to the object we're trying to construct being too large, this leaves the BSONObjBuilder in a state where "_doneCalled" is true, which can later lead to this invariant being hit unexpectedly. We should either make this function exception-safe and reset the state of the BSONObjBuilder to how it was before calling _done() in this line, if possible, and if not, we should update callers to be prepared for the possibility of this throwing.
Attachments
Issue Links
- has to be done after
-
SERVER-42313 Fix forwarding reference issue in `ScopeGuard`
-
- Closed
-
- has to be done before
-
SERVER-42034 Remove numStr from BSONObjBuilder
-
- Closed
-