[SERVER-16496] override Boost's assert handler Created: 10/Dec/14 Updated: 22/Feb/16 Resolved: 22/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | build-jbr | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||
| Description |
|
Currently we are using the default handler, which prints a message to stderr and then calls abort(). This behavior makes this type of problem difficult to debug. Instead, we can have our own function be called via BOOST_ENABLE_ASSERT_HANDLER, which can put the message into the server log and then shut down the server via fassert. Boost assertions can be tripped by invalid use of shared_ptr and scoped_ptr, for example. |
| Comments |
| Comment by Githook User [ 17/Feb/16 ] |
|
Author: {u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}Message: Revert " This reverts commit dad1e14a3d8ed6f17525f27ef823891a1836b8a6. |
| Comment by Eric Milkie [ 16/Feb/16 ] |
|
It doesn't seem to have worked; now instead of printing the generic Assertion message in the log, we get nothing: |
| Comment by Githook User [ 10/Feb/16 ] |
|
Author: {u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}Message: |