MOZ_CRASH() should have noreturn semantics

RESOLVED FIXED

Status

()

Core
MFBT
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Waldo, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

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
Last Resolved: 5 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.