Closed Jake-Shadle closed 2 years ago
On our side it's needed mainly to catch stack overflows and to guarantee that we can catch other type of crashes even when we're close to the stack limit. Our graphics code has often deep stacks, so even though the code might not overflow the stack directly the exception handler might.
Hmm, I suppose my stack overflow tests must be incorrect then since they are catching those cases from main and non-main threads just fine so far, so they must not be complicated enough, or perhaps this is because the alternate stack from the standard library giving a false sense of security.
Are you using Rust for the tests? IIRC the Rust runtime adds an alternate signal stack to every thread that's created unless you provide yours.
Yeah, it's here.
Yes, now that I've directly invoked pthread_create it doesn't work, so fixing now. :slightly_smiling_face:
Firefox does a rather complicated interposition of
pthread_create
to ensure that the alternate signal stack is always used for every thread, but...I'm not actually 100% sure this is needed.