Closed Bug 762675 Opened 12 years ago Closed 12 years ago

MOZ_CRASH() should have noreturn semantics

Categories

(Core :: MFBT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Waldo, Unassigned)

References

Details

Compilers aren't informed that MOZ_CRASH() will halt execution, so compilers expect control flow might proceed past it, leading to suboptimal code and the possibility of build warnings.  See bug 761859 comment 5.
Fixed in bug 763000.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
The problem with this is that it also allows the compiler to do some optimizations that don't help when doing a stack trace. Specifically, on ARM, the compiler may not preserve the lr register which is detrimental to getting good stack traces, and thus good crash reports. See bug 697301.
You need to log in before you can comment on or make changes to this bug.