We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The error currently shows as
2020-01-16 17:03:46,825 ERROR [oak] panic occurred in file 'abitest/tests/src/tests.rs' at line 76: <UNKNOWN MESSAGE>
To reproduce, add assert_eq!(1, 2) to some function under test, e.g.:
assert_eq!(1, 2)
oak/examples/abitest/tests/src/tests.rs
Lines 55 to 88 in f317c1c
and then run the tests locally with cargo test.
cargo test
Note that panic!("xxx") seems to show up fine instead, not sure if assert_eq is using a different mechanism behind the scenes.
panic!("xxx")
assert_eq
I also noticed similar errors a few times when running compiled code on the Oak Runtime, but I don't have reproducibility steps for that yet.
@conradgrobler could you take a look? @daviddrysdale may have some thoughts about it too
The text was updated successfully, but these errors were encountered:
The <UNKNOWN MESSAGE> indicates that the panic hook that we register in oak::set_panic_hook has been unable to retrieve the payload from the PanicInfo. Dunno (yet) why that should happen for a panic! generated from the assert_eq! macro but not from an unadorned panic!.
<UNKNOWN MESSAGE>
oak::set_panic_hook
PanicInfo
panic!
assert_eq!
Sorry, something went wrong.
The panic details are also lost if a plain panic! has arguments (e.g. panic!("some {:?} thing", 1);). Maybe it's a Rust bug/limitation?
panic!("some {:?} thing", 1);
rust-lang/rust#66745 looks potentially relevant.
Changing the custom panic hook to handle the downcasting in a way that is more similar to the default hook should resolve it.
https://github.com/rust-lang/rust/blob/7d761fe0462ba0f671a237d0bb35e3579b8ba0e8/src/libstd/panicking.rs#L171-L177
Resolved by #485
conradgrobler
No branches or pull requests
The error currently shows as
To reproduce, add
assert_eq!(1, 2)
to some function under test, e.g.:oak/examples/abitest/tests/src/tests.rs
Lines 55 to 88 in f317c1c
and then run the tests locally with
cargo test
.Note that
panic!("xxx")
seems to show up fine instead, not sure ifassert_eq
is using a different mechanism behind the scenes.I also noticed similar errors a few times when running compiled code on the Oak Runtime, but I don't have reproducibility steps for that yet.
@conradgrobler could you take a look? @daviddrysdale may have some thoughts about it too
The text was updated successfully, but these errors were encountered: