From:  Emanuel Hoogeveen <emanuel.hoogeveen@gmail.com>
Date:  11 Nov 2016 06:06:15 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.tech.js-engine.internals
Subject:  

PSA: Crash reports from crashes in SpiderMonkey now have moz crash reasons

NNTP-Posting-Host:  24.132.14.200

With the landing of bug 1309573 (included in today's Nightly), crash reports from intentionally triggered crashes in SpiderMonkey now have a 'moz crash reason', which is the reason string or expression from a MOZ_CRASH() or failed assertion. This is something that most of core Gecko has had access to all along, but it was predicated on both MOZILLA_INTERNAL_API and MOZ_CRASHREPORTER - neither of which libjs had access to!

The moz crash reason can be useful to understand stacks with heavy inlining at a glance, and might help aggregate crash signatures if the reason string or expression is unique enough. It can also be used to expose dynamic information such as an error code, though MOZ_CRASH() itself only works with string literals (several places in Gecko already work around this).

As proof that this is working now, here are the first two crash reports from crashes in SM with a moz crash reason:
https://crash-stats.mozilla.com/report/index/2b5360a0-a360-4f7f-8402-b07bb2161110
https://crash-stats.mozilla.com/report/index/f5aca357-47fd-475f-ae51-4c4a82161110

For context, we discovered that the moz crash reason was missing because the annotations from bug 1305360 weren't showing up. The protection added in that bug generates generic memory protection crashes that are very hard to pick out from the crowd without an annotation, so having the moz crash reason is essential.