-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Collect and emit proper backtraces for delay_span_bug
s
#106321
Conversation
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
53ffff4
to
7bab33a
Compare
7bab33a
to
05c1ac0
Compare
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 |
🌲 The tree is currently closed for pull requests below priority 50. This pull request will be tested once the tree is reopened. |
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
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. |
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 is a follow-up to #106317, which addresses this comment (#106267 (comment)) which notes that
delay_span_bug
s' 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_delayed
on frame 18. This is at the end of the compilation session, far from where the bug is being delayed.After, note
typeck_with_fallback
on the 5th frame, that's where we actually need to be pointed to: