Skip to content
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

syntax: Suppress panic message on fatal #27153

Merged
merged 1 commit into from Jul 21, 2015

Conversation

alexcrichton
Copy link
Member

This commit ensures that the rustc thread does not leak a panic message whenever
a call to fatal happens. This already happens for the main rustc thread as
part of the rustc_driver::monitor function, but the compiler also spawns
threads for other operations like -C codegen-units, and sometimes errors are
emitted on these threads as well. To ensure that there's a consistent
error-handling experience across threads this unifies these two to never print
the panic message in the case of a normal and expected fatal error.

This should also fix the flaky asm-src-loc-codegen-units.rs test as the output
is sometimes garbled if diagnostics are printed while the panic message is also
being printed.

This commit ensures that the rustc thread does not leak a panic message whenever
a call to `fatal` happens. This already happens for the main rustc thread as
part of the `rustc_driver::monitor` function, but the compiler also spawns
threads for other operations like `-C codegen-units`, and sometimes errors are
emitted on these threads as well. To ensure that there's a consistent
error-handling experience across threads this unifies these two to never print
the panic message in the case of a normal and expected fatal error.

This should also fix the flaky `asm-src-loc-codegen-units.rs` test as the output
is sometimes garbled if diagnostics are printed while the panic message is also
being printed.
@rust-highfive
Copy link
Collaborator

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@brson
Copy link
Contributor

brson commented Jul 20, 2015

@bors r+

@bors
Copy link
Contributor

bors commented Jul 20, 2015

📌 Commit 013d47b has been approved by brson

@bors
Copy link
Contributor

bors commented Jul 21, 2015

⌛ Testing commit 013d47b with merge 247a0d1...

bors added a commit that referenced this pull request Jul 21, 2015
This commit ensures that the rustc thread does not leak a panic message whenever
a call to `fatal` happens. This already happens for the main rustc thread as
part of the `rustc_driver::monitor` function, but the compiler also spawns
threads for other operations like `-C codegen-units`, and sometimes errors are
emitted on these threads as well. To ensure that there's a consistent
error-handling experience across threads this unifies these two to never print
the panic message in the case of a normal and expected fatal error.

This should also fix the flaky `asm-src-loc-codegen-units.rs` test as the output
is sometimes garbled if diagnostics are printed while the panic message is also
being printed.
@bors bors merged commit 013d47b into rust-lang:master Jul 21, 2015
@alexcrichton alexcrichton deleted the flaky-tests branch July 21, 2015 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants