-
Notifications
You must be signed in to change notification settings - Fork 386
By default, RUST_BACKTRACE=1 silently has no effect on Miri, even though it is suggested in panic messages #2855
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Does disabling isolation help? |
There's no bug here, but I do believe we have a diagnostic issue. @matthiaskrgr is a decently experienced Rust and Miri user, if this is too subtle for Matthias it has probably tripped up new Miri users. @rust-lang/miri Is there a reasonable way to solve this in Miri? I'm tempted to stick something like this into the standard library right after the |
Ah... Yeah I think I was also confused by this at least once.^^ We could consider forwarding that env var by default but then default mode is not fully host-independent any more.
|
We could also always set it when isolation is enabled. The only potential hazard there is that I have seen one other library check for But really what I'm asking is: Can we detect in Miri that we have hit the default panic handler and printed a backtrace, then issue our own little |
We could make |
misaligned pointer dereference
panic?
We could also always add some cfg!(miri) code.
|
Should this be moved to the rust-lang/miri repo? |
No, 2 of the 3 proposed solutions involve modifying the standard library code. |
This is a Miri issue, so moving to the Miri repo. |
I believe the preferable solution would be to simply ignore the env vars and emit a backtrace while emitting a backtrace due to panic. |
…lstrieb when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes rust-lang/miri#2855
That seems like an odd difference between regular default and Miri defaults to me. |
…lstrieb when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes rust-lang/miri#2855
…lstrieb when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes rust-lang/miri#2855
…lstrieb when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes rust-lang/miri#2855
Rollup merge of rust-lang#124116 - RalfJung:miri-rust-backtrace, r=Nilstrieb when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes rust-lang/miri#2855
when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes #2855
when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes rust-lang/miri#2855
when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes rust-lang/miri#2855
cc rust-lang/rust#98112
cc @saethlin
Code from the pr
run with
RUST_BACKTRACE=1 ~/.cargo/bin/cargo miri run
seems to not print any backtrace disregarding what the panic output suggests:The text was updated successfully, but these errors were encountered: