-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoc: Fix ICE report #92310
Merged
Merged
rustdoc: Fix ICE report #92310
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
rustbot
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Dec 27, 2021
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Dec 27, 2021
I'd always wondered why it reported an argument error... |
JohnCSimon
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jan 23, 2022
Ah, cool, the strange behaviour in #93579 is explained :-). Thanks for fixing. |
@bors r+ |
📌 Commit 4413141 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Feb 2, 2022
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 3, 2022
rustdoc: Fix ICE report The ICE report in rustdoc was confusing because it was returning an argument parse error: ``` thread 'rustc' panicked at 'aborting due to `-Z treat-err-as-bug=1`', compiler/rustc_errors/src/lib.rs:1212:27 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace error: internal compiler error: unexpected panic error: Unrecognized option: 'crate-version' ``` This is because the ICE reporter was trying to parse the arguments as rustc, not rustdoc. Since an argument error is a fatal error, it was early-exiting with the argument error due to unwinding. This changes it to be a more primitive scan of the arguments. The arguments being checked are pretty simple, and only have a small handful of forms that are easy to check for. It now looks like this: ``` thread 'rustc' panicked at 'aborting due to `-Z treat-err-as-bug=1`', compiler/rustc_errors/src/lib.rs:1212:27 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md note: rustc 1.59.0-dev running on x86_64-apple-darwin note: compiler flags: --crate-type lib -Z treat-err-as-bug note: some of the compiler flags provided by cargo are hidden query stack during panic: end of query stack ``` It still says `rustc`, but I can live with that.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 3, 2022
Rollup of 7 pull requests Successful merges: - rust-lang#92310 (rustdoc: Fix ICE report) - rust-lang#92802 (Deduplicate lines in long const-eval stack trace) - rust-lang#93515 (Factor convenience functions out of main printer implementation) - rust-lang#93566 (Make rustc use `RUST_BACKTRACE=full` by default) - rust-lang#93589 (Use Option::then in two places) - rust-lang#93600 (fix: Remove extra newlines from junit output) - rust-lang#93606 (Correct incorrect description of preorder traversals) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This was referenced Sep 8, 2022
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Sep 10, 2022
Fix ICE report flags display. rust-lang#92310 made some changes to the ICE report that displays the rustc flags, but it introduced a bug where a flag like `-Z incremental-verify-ich=yes` was being treated as-if it was `-Cincremental`. This corrupted the output and made it confusing. The cause was using `starts_with` instead of properly splitting the option. For example, with the command like `rustc foo.rs -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib` would previously look like: ``` note: compiler flags: -C incremental -Z incremental --crate-type lib ``` It now looks like: ``` note: compiler flags: -C incremental=[REDACTED] -Z incremental-verify-ich=yes --crate-type lib ``` I added a `[REDACTED]` marker for `-Cincremental` so it is a little less confusing that a value has been removed. Fixes rust-lang#101588
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The ICE report in rustdoc was confusing because it was returning an argument parse error:
This is because the ICE reporter was trying to parse the arguments as rustc, not rustdoc. Since an argument error is a fatal error, it was early-exiting with the argument error due to unwinding.
This changes it to be a more primitive scan of the arguments. The arguments being checked are pretty simple, and only have a small handful of forms that are easy to check for.
It now looks like this:
It still says
rustc
, but I can live with that.