[SERVER-53065] std::terminate handler must learn to print ASSERT failures Created: 24/Nov/20 Updated: 29/Oct/23 Resolved: 17/Dec/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | Billy Donahue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Service arch 2020-12-28 | ||||||||
| Participants: | |||||||||
| Description |
|
ASSERT statements in unit tests throw TestAssertionFailureException. Idea: We can even do this by making the terminate handler wildcard catch(...) go through a global registry of Lippincott functions to see if any of them can identify the current exception and produce good diagnostics for it. It's perhaps unreasonable to expect that the global terminate handler can have a special case for every kind of exception that might be active. Libraries (fmt, boost, unittest) introduce their own exception types. That's fine as long as they can also add handlers to print diagnostics. |
| Comments |
| Comment by Githook User [ 17/Dec/20 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |
| Comment by Billy Donahue [ 04/Dec/20 ] |
| Comment by Billy Donahue [ 02/Dec/20 ] |
|
Linking So it comes out of the unittest library, but it's a general problem. If we link with a library, we are linking with all of its exception types, any of which the std::terminate handler might be asked to handle. It would be useful then for the terminate handler to be extensible to accommodate those exceptions. |