[SERVER-18373] MONGO_COMPILER_UNREACHABLE should terminate if violated Created: 07/May/15 Updated: 08/Jan/16 Resolved: 15/May/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.9, 3.1.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Adam Midvidy |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Backport Completed: | |||||||||
| Sprint: | Platform 3 05/15/15 | ||||||||
| Participants: | |||||||||
| Description |
|
The current MONGO_COMPILER_UNREACHABLE simply uses __builtin_unreachable, however if control does flow past it then the behavior is undefined. We would prefer to terminate. We should write a new macro MONGO_UNREACHABLE, that invokes invariantFailed or similar. Optionally, the macro could follow that call to invariantFailed with __builtin_unreachable, however this should probably be unnecessary, as whatever function is called by the macro should be tagged noreturn. |
| Comments |
| Comment by Githook User [ 08/Jan/16 ] |
|
Author: {u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}Message: |
| Comment by Githook User [ 15/May/15 ] |
|
Author: {u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}Message: |