Description
Bugzilla Link | 41581 |
Version | 8.0 |
OS | Windows NT |
Blocks | #40566 |
CC | @efriedma-quic,@froydnj,@mstorsjo,@sylvestre |
Extended Description
We encountered this issue when building Firefox for Windows/AArch64 using clang 8.0.0 [1]. The issue was introduced in [2].
What's happening is that we install an exception handler with SetUnhandledExceptionFilter()
[3] to gather crash dumps. Starting with clang-8.0.0 this stopped working in many cases; when we encountered an exception Windows would be unable to unwind the stack and reach the exception handler, bailing out if it encountered a frame pointing to the JavaScript interpreter [3] on the stack. The interpreter uses macros to generate a large jump-table and [2] changed in which section the jump-table contents are stored. This seems to confuse Windows' unwinding machinery which simply bails out when encountering a frame that jumped through that table.
I've compared the code emitted w/ and w/o [2] applied and the only difference are the section directives around the jump table. I can attach the relevant assembly output if needed but it's very, very large.
I'm working on a reduced test-case and I'll attach it ASAP.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1542827
[2] 502c655
[3] https://searchfox.org/mozilla-central/rev/ec489aa170b6486891cf3625717d6fa12bcd11c1/js/src/vm/Interpreter.cpp#1653-4424