-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manually test that panicking from C will abort the process #290
Manually test that panicking from C will abort the process #290
Conversation
4095be0
to
e0b3145
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat! ack
e0b3145
to
b3055d0
Compare
24df7ce
to
d764a43
Compare
Okay fixed... I have no idea about WASM builds but AFAIU this currently does not test if the panic works on WASM. |
9be4c4e
to
b27f0fa
Compare
Panicking from C is not UB in newer rust versions and will reliably trigger an abort (without unwinding). In older rust versions, it is technically UB but empirically it seems to "just work" (and what should it realistically do except crashing, which is what we intent). Since there's potentially no unwinding, we can't test this behavior using [should_panic]. This PR will instead check the libtest output explicitly in our CI tests. Fixes rust-bitcoin#228.
b27f0fa
to
1eb2c32
Compare
Ok this should be really ready for review now... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Verified that if it panics for another reason it fails
Verified that if it doesn't panic it also fails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utack
Panicking from C is not UB in newer rust versions and will reliably
trigger an abort (without unwinding). In older rust versions, it is
technically UB but empirically it seems to "just work" (and what should
it realistically do except crashing, which is what we intent).
Since there's potentially no unwinding, we can't test this behavior
using [should_panic]. This PR will check the exit code instead in our
CI tests.
Fixes #228. This is an alternative to #288.