[cross-posted to stability and crash-reporting-wg]
TL;DR we are now able to catch all crashes caused by stack overflows on
Linux/Android. Be prepared to see an increase in nightly's crash rate as
well as some brand new crash signatures.
Longer version:
While investigating bug 1678152 [1] we discovered that we were able to
catch crashes caused by stack overflows on Linux only when they happened
on the main thread. Overflows in any other threads could silently crash
the browser (or one of the child processes) without leaving a trace.
This was fixed by installing a suitably sized alternate stack to handle
signals on every thread we create. This is achieved via an interposer
function that hides `pthread_create()` and then calls it internally.
This behavior should be transparent to user code (only the sandbox cares
about it) but be aware that it's there. Additionally when compiling with
the crash reporter disabled this code won't be included.
Also be aware that macOS is also affected by this issue and we haven't a
fix for it yet.
Gabriele
[1] Some (parent process) crashes don't yield stack traces
https://bugzilla.mozilla.org/show_bug.cgi?id=1678152