Repository navigation
tests: handle onAbort as well as onExit in browser_reporting.js - #13631
Conversation
a330e18 to
4e412e7
Compare
|
This is great!
Btw, what happens to C++ exceptions at the moment - I know they throw on the JS side, but do they become regular JS exceptions or also go via abort? |
Good question, I'm not sure about that. I think it would be good if both C++ and JS exceptions also reported SIGABORT in the onExit handler for the purposed of btest_exit. We can look into that as a followup. |
5b16bcc to
c813d22
Compare
|
Sorry, looks like the code here is included in another PR (#13632) and I read that one first, and commented there already, but the comment is relevant more for this one. |
""" Do you think this is strongly worth fixing in general? If the main reason is the test suite issue, I think we can fix that by adding Module.onAbort alongside Module.onExit which we already have in runner.py. That would avoid a code size increase. Ok I'll give the onAbort approach at try. |
c813d22 to
2a41e85
Compare
2a41e85 to
f1725db
Compare
f1725db to
93bdb3e
Compare
|
I'm missing some context, why is it a code size increase in its previous form? |
It added a little code to check for |
93bdb3e to
4b4792f
Compare
I can't say I understand this test well enough to know how it was passing before but this seems like it is clearly a typo. Without this change the test happens to occationally generate abort(CompileError bad magic number) error at least some of the time. These abort() don't see to cause the test to fail but I have another chnage the makes the test runner more sensitive to abort() exceptions propogating all the way out: #13631 Fixing this typo seems to make these aborts go away.
Ah, right. I assumed you mean code size increase at a different scale :) |
4b4792f to
953d024
Compare
kripken
left a comment
There was a problem hiding this comment.
The changes to preamble.js look unrelated? (if not, how do they relate?)
There are 2 changes to preamble. The extra return prevents onObort from firing then WASM=2 mode redirects from wasm to JS (we don't want this to count as an actual abort. The change from 1 to 134 for the EXITSTATUS of abort is unrelated but also I think a better choice. 134 is what linux and other unixs will return on abort() and it avoids confusion with valid exit codes (or which 1 is certainly one). This was an essential part of the earlier version. If you prefer, since its unneeded for this particular change, I can revert. |
I can't say I understand this test well enough to know how it was passing before but this seems like it is clearly a typo. Without this change the test happens to occasionally generate abort(CompileError bad magic number) error at least some of the time. These abort() don't see to cause the test to fail but I have another change the makes the test runner more sensitive to abort() exceptions propagating all the way out: #13631 Fixing this typo seems to make these aborts go away.
953d024 to
6296714
Compare
6296714 to
854f129
Compare
This fixes the problem that assert/abort was not being reporting during btest_exit. As a followup we probably want also want make sure we handle all JS and C++ exceptions in some way too, but this is still a good fix on its own. Fixes: #13628
854f129 to
a8a89a8
Compare
Thanks to #13631, we can now test against plain assert messages.
This fixes the problem that assert/abort was not being reporting during
btest_exit.
As a followup we probably want also want make sure we handle all JS
and C++ exceptions in some way too, but this is still a good fix on its
own.
Fixes: #13628