Collect and emit proper backtraces for delay_span_bugs#106321
Merged
bors merged 1 commit intorust-lang:masterfrom Jan 11, 2023
Merged
Collect and emit proper backtraces for delay_span_bugs#106321bors merged 1 commit intorust-lang:masterfrom
delay_span_bugs#106321bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
53ffff4 to
7bab33a
Compare
7bab33a to
05c1ac0
Compare
Member
|
r? Nilstrieb I would like if we had a better way to test ICE messages in general (delayed bugs and also other kinds of ICEs), maybe some kind of |
Collaborator
Collaborator
|
🌲 The tree is currently closed for pull requests below priority 50. This pull request will be tested once the tree is reopened. |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 11, 2023
Rollup of 9 pull requests Successful merges: - rust-lang#106321 (Collect and emit proper backtraces for `delay_span_bug`s) - rust-lang#106397 (Check `impl`'s `where` clauses in `consider_impl_candidate` in experimental solver) - rust-lang#106427 (Improve fluent error messages) - rust-lang#106570 (add tests for div_duration_* functions) - rust-lang#106648 (Polymorphization cleanup) - rust-lang#106664 (Remove unnecessary lseek syscall when using std::fs::read) - rust-lang#106709 (Disable "split dwarf inlining" by default.) - rust-lang#106715 (Autolabel and ping wg for changes to new solver) - rust-lang#106717 (fix typo LocalItemId -> ItemLocalId) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Contributor
|
oddly, this appears to have injected a slight regression according to the timing results presented on rollup PR #106730. it may well be noise, though. |
Contributor
Author
|
As @Nilstrieb said, I'm inclined to believe this is noise because this code is on the error path only. We never delay span bugs without fatally exiting. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a follow-up to #106317, which addresses this comment (#106267 (comment)) which notes that
delay_span_bugs' backtraces are nonsense.Captures and emits the backtrace of the delayed span bug when it's created, rather than using the backtrace of the place where delayed bugs are flushed.
To test, I delayed a span bug during HIR typeck, specifically in
typeck_with_fallback...Before, note
flush_delayedon frame 18. This is at the end of the compilation session, far from where the bug is being delayed.After, note
typeck_with_fallbackon the 5th frame, that's where we actually need to be pointed to: