-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation #124116
Conversation
r? @Nilstrieb rustbot has assigned @Nilstrieb. Use |
The Miri subtree was changed cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
db97444
to
3e63398
Compare
@bors r+ rollup |
Huh. @RalfJung Would you rather we always print a backtrace when we panic while running in Miri? That was one of the solutions discussed in rust-lang/miri#2855 Note this is different from "setting |
Well, approximately-equal-to one of the solutions. |
…lstrieb when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes rust-lang/miri#2855
I don't think that would be a good default for Miri, just like it is not a good default for regular execution. |
🤔 It would seem to me you usually would want a backtrace? But okay! |
Funny you should say that. Every codebase at my employer has this at the top of if std::env::var("RUST_BACKTRACE").is_err() {
std::env::set_var("RUST_BACKTRACE", "1");
} And I know from a discussion on Mastodon a few days ago that we are not the only ones doing this. |
Yes. I think we would want to default to it on, except we may wish to get better at printing shorter backtraces first, so that |
…lstrieb when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes rust-lang/miri#2855
Okay, let me rephrase: I don't think Miri's default should be different from that of regular Rust. |
Ah, I see! I only figured that since Miri strongly functions as an error-reporting tool, that you might consider deviating on this point acceptable. But I do understand preferring to avoid differences in execution, considering it mostly is good at error-reporting by being good at simulation. |
Almost every time we made Miri divert from regular execution, we eventually decided that was a bad idea. Maybe this is one of the few exceptions, but it doesn't seem obvious to me. |
Yeah; on balance I think the extra note is the best approach. |
…lstrieb when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes rust-lang/miri#2855
…kingjubilee Rollup of 6 pull requests Successful merges: - rust-lang#117919 (Introduce perma-unstable `wasm-c-abi` flag) - rust-lang#123571 (Correctly change type when adding adjustments on top of `NeverToAny`) - rust-lang#123752 (Properly handle emojis as literal prefix in macros) - rust-lang#123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc) - rust-lang#124110 (Fix negating `f16` and `f128` constants) - rust-lang#124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation) r? `@ghost` `@rustbot` modify labels: rollup
…lstrieb when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation Fixes rust-lang/miri#2855
…kingjubilee Rollup of 9 pull requests Successful merges: - rust-lang#117919 (Introduce perma-unstable `wasm-c-abi` flag) - rust-lang#123406 (Force exhaustion in iter::ArrayChunks::into_remainder) - rust-lang#123752 (Properly handle emojis as literal prefix in macros) - rust-lang#123935 (Don't inline integer literals when they overflow - new attempt) - rust-lang#123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc) - rust-lang#124019 (Use raw-dylib for Windows synchronization functions) - rust-lang#124110 (Fix negating `f16` and `f128` constants) - rust-lang#124112 (Fix ICE when there is a non-Unicode entry in the incremental crate directory) - rust-lang#124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation) r? `@ghost` `@rustbot` modify labels: rollup
…kingjubilee Rollup of 7 pull requests Successful merges: - rust-lang#123406 (Force exhaustion in iter::ArrayChunks::into_remainder) - rust-lang#123752 (Properly handle emojis as literal prefix in macros) - rust-lang#123935 (Don't inline integer literals when they overflow - new attempt) - rust-lang#123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc) - rust-lang#124019 (Use raw-dylib for Windows synchronization functions) - rust-lang#124110 (Fix negating `f16` and `f128` constants) - rust-lang#124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation) r? `@ghost` `@rustbot` modify labels: rollup
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
Fixes rust-lang/miri#2855