-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rollup of 9 pull requests #106730
Rollup of 9 pull requests #106730
Conversation
This matches clang's behavior and makes split-debuginfo behave as expected (i.e. actually split the debug info). Fixes rust-lang#106592
…ace, r=Nilstrieb Collect and emit proper backtraces for `delay_span_bug`s This is a follow-up to rust-lang#106317, which addresses this comment (rust-lang#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. ``` error: internal compiler error: test --> /home/ubuntu/test.rs:1:1 | 1 | fn main() {} | ^^^^^^^^^ | = note: delayed at compiler/rustc_hir_typeck/src/lib.rs:196:14 thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1634:13 stack backtrace: 0: 0x7f9c3ec69dd1 - std::backtrace_rs::backtrace::libunwind::trace::h26056f81198c6594 at /home/ubuntu/rust2/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7f9c3ec69dd1 - std::backtrace_rs::backtrace::trace_unsynchronized::hacfb345a0c6d5bb1 at /home/ubuntu/rust2/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f9c3ec69dd1 - std::sys_common::backtrace::_print_fmt::h18ea6016ac8030f3 at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:65:5 3: 0x7f9c3ec69dd1 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he35dde201d0c2d09 at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7f9c3ecee308 - core::fmt::write::h094ad263467a053c at /home/ubuntu/rust2/library/core/src/fmt/mod.rs:1208:17 5: 0x7f9c3ec8aaf1 - std::io::Write::write_fmt::hd47b4e2324b4d9b7 at /home/ubuntu/rust2/library/std/src/io/mod.rs:1682:15 6: 0x7f9c3ec69bfa - std::sys_common::backtrace::_print::h43044162653a17fc at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:47:5 7: 0x7f9c3ec69bfa - std::sys_common::backtrace::print::hc8605da258fa5aeb at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:34:9 8: 0x7f9c3ec4db87 - std::panicking::default_hook::{{closure}}::h9e37f23f75122a15 9: 0x7f9c3ec4d97b - std::panicking::default_hook::h602873a063f84da2 at /home/ubuntu/rust2/library/std/src/panicking.rs:286:9 10: 0x7f9c3f6672b2 - <alloc[48d7b30605060536]::boxed::Box<dyn for<'a, 'b> core[672e3947e150d6c6]::ops::function::Fn<(&'a core[672e3947e150d6c6]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[672e3947e150d6c6]::marker::Send + core[672e3947e150d6c6]::marker::Sync> as core[672e3947e150d6c6]::ops::function::Fn<(&core[672e3947e150d6c6]::panic::panic_info::PanicInfo,)>>::call at /home/ubuntu/rust2/library/alloc/src/boxed.rs:2002:9 11: 0x7f9c3f6672b2 - rustc_driver[f5b6d32d8905ecdd]::DEFAULT_HOOK::{closure#0}::{closure#0} at /home/ubuntu/rust2/compiler/rustc_driver/src/lib.rs:1204:17 12: 0x7f9c3ec4e0d3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hfd13333ca953ae8e at /home/ubuntu/rust2/library/alloc/src/boxed.rs:2002:9 13: 0x7f9c3ec4e0d3 - std::panicking::rust_panic_with_hook::h45753e10264ebe7e at /home/ubuntu/rust2/library/std/src/panicking.rs:692:13 14: 0x7f9c422a1aa3 - std[3330b4673efabfce]::panicking::begin_panic::<rustc_errors[1b15f4e7e49d1fd5]::ExplicitBug>::{closure#0} at /home/ubuntu/rust2/library/std/src/panicking.rs:608:9 15: 0x7f9c422a1a46 - std[3330b4673efabfce]::sys_common::backtrace::__rust_end_short_backtrace::<std[3330b4673efabfce]::panicking::begin_panic<rustc_errors[1b15f4e7e49d1fd5]::ExplicitBug>::{closure#0}, !> at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:137:18 16: 0x7f9c3f63a996 - std[3330b4673efabfce]::panicking::begin_panic::<rustc_errors[1b15f4e7e49d1fd5]::ExplicitBug> at /home/ubuntu/rust2/library/std/src/panicking.rs:607:12 17: 0x7f9c4227a496 - std[3330b4673efabfce]::panic::panic_any::<rustc_errors[1b15f4e7e49d1fd5]::ExplicitBug> at /home/ubuntu/rust2/library/std/src/panic.rs:61:5 18: 0x7f9c4227cdf7 - <rustc_errors[1b15f4e7e49d1fd5]::HandlerInner>::flush_delayed::<alloc[48d7b30605060536]::vec::Vec<rustc_errors[1b15f4e7e49d1fd5]::diagnostic::Diagnostic>, &str, rustc_errors[1b15f4e7e49d1fd5]::ExplicitBug> at /home/ubuntu/rust2/compiler/rustc_errors/src/lib.rs:1634:13 19: 0x7f9c422498cf - <rustc_errors[1b15f4e7e49d1fd5]::Handler>::flush_delayed at /home/ubuntu/rust2/compiler/rustc_errors/src/lib.rs:1225:9 [ FRAMES INTENTIONALLY OMITTED ] 44: 0x7f9c3f6f3584 - <std[3330b4673efabfce]::thread::Builder>::spawn_unchecked_::<rustc_interface[947706ead88047d0]::util::run_in_thread_pool_with_globals<rustc_interface[947706ead88047d0]::interface::run_compiler<core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>, rustc_driver[f5b6d32d8905ecdd]::run_compiler::{closure#1}>::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#1} at /home/ubuntu/rust2/library/std/src/thread/mod.rs:549:30 45: 0x7f9c3f6f3584 - <<std[3330b4673efabfce]::thread::Builder>::spawn_unchecked_<rustc_interface[947706ead88047d0]::util::run_in_thread_pool_with_globals<rustc_interface[947706ead88047d0]::interface::run_compiler<core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>, rustc_driver[f5b6d32d8905ecdd]::run_compiler::{closure#1}>::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#1} as core[672e3947e150d6c6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} at /home/ubuntu/rust2/library/core/src/ops/function.rs:250:5 46: 0x7f9c3ec81968 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he8b26fc22c6f51ec at /home/ubuntu/rust2/library/alloc/src/boxed.rs:1988:9 47: 0x7f9c3ec81968 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5cf9cbe75a8c3ddc at /home/ubuntu/rust2/library/alloc/src/boxed.rs:1988:9 48: 0x7f9c3ec5f99c - std::sys::unix::thread::Thread::new::thread_start::h2d6dd4455e97d031 at /home/ubuntu/rust2/library/std/src/sys/unix/thread.rs:108:17 49: 0x7f9c37c69609 - start_thread 50: 0x7f9c3ead0133 - clone 51: 0x0 - <unknown> ``` After, note `typeck_with_fallback` on the 5th frame, that's where we *actually* need to be pointed to: ``` error: internal compiler error: no errors encountered even though `delay_span_bug` issued error: internal compiler error: test --> /home/ubuntu/test.rs:1:1 | 1 | fn main() {} | ^^^^^^^^^ | = note: delayed at 0: <rustc_errors::HandlerInner>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1279:29 1: <rustc_errors::HandlerInner>::delay_span_bug::<rustc_span::span_encoding::Span, &str> at ./compiler/rustc_errors/src/lib.rs:1553:9 2: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, &str> at ./compiler/rustc_errors/src/lib.rs:995:9 3: <rustc_session::session::Session>::delay_span_bug::<rustc_span::span_encoding::Span, &str> at ./compiler/rustc_session/src/session.rs:600:9 4: rustc_hir_typeck::typeck_with_fallback::<rustc_hir_typeck::typeck::{closure#0}>::{closure#0} at ./compiler/rustc_hir_typeck/src/lib.rs:196:5 5: rustc_hir_typeck::typeck_with_fallback::<rustc_hir_typeck::typeck::{closure#0}> at ./compiler/rustc_hir_typeck/src/lib.rs:185:36 6: rustc_hir_typeck::typeck at ./compiler/rustc_hir_typeck/src/lib.rs:166:9 [ FRAMES INTENTIONALLY OMITTED ] 108: std::panicking::try::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, core::panic::unwind_safe::AssertUnwindSafe<<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1}::{closure#0}>> at ./library/std/src/panicking.rs:447:19 109: std::panic::catch_unwind::<core::panic::unwind_safe::AssertUnwindSafe<<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1}::{closure#0}>, core::result::Result<(), rustc_errors::ErrorGuaranteed>> at ./library/std/src/panic.rs:140:14 110: <std::thread::Builder>::spawn_unchecked_::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} at ./library/std/src/thread/mod.rs:549:30 111: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} at ./library/core/src/ops/function.rs:250:5 112: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once at ./library/alloc/src/boxed.rs:1988:9 113: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once at ./library/alloc/src/boxed.rs:1988:9 114: std::sys::unix::thread::Thread::new::thread_start at ./library/std/src/sys/unix/thread.rs:108:17 115: start_thread 116: clone ```
…, r=lcnr Check `impl`'s `where` clauses in `consider_impl_candidate` in experimental solver Check impl's nested predicates as part of the recursive evaluate in `consider_impl_candidate`. <sub>Unless, for some reason, these are intentionally **not** checked here -- in which case, I really don't understand where they're being checked...<sub> r? ```@lcnr```
Improve fluent error messages These have been really frustrating me while migrating diagnostics.
…Titor add tests for div_duration_* functions Per rust-lang#63139 (comment) this adds unit tests for the functions that will hopefully effectively demonstrate that `div_duration` is ready to be stabilized.
…-errors Polymorphization cleanup Split out of rust-lang#106233 Use a newtype instead of a bitset directly. This makes the code way easier to read and easier to adapt for future changes.
…e-lseek, r=cuviper Remove unnecessary lseek syscall when using std::fs::read Fixes rust-lang#106597 r? ```@bjorn3```
…_by_default, r=davidtwco Disable "split dwarf inlining" by default. This matches clang's behavior and makes split-debuginfo behave as expected (i.e. actually split the debug info). Fixes rust-lang#106592
Autolabel and ping wg for changes to new solver r? ```@lcnr```
fix typo LocalItemId -> ItemLocalId
@bors r+ rollup=never p=9 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: b22c152958 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (ef4046e): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
@rust-timer build 28d6383a20203a942f27d95cd73e4a0840215807 |
This comment has been minimized.
This comment has been minimized.
@rust-timer build 40306d15c01aa204444bad40f144f67eab627212 |
Finished benchmarking commit (28d6383a20203a942f27d95cd73e4a0840215807): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
@rust-timer build 40306d15c01aa204444bad40f144f67eab627212 |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (40306d15c01aa204444bad40f144f67eab627212): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
@rust-timer build 31e458cecb1ee908068a512aae377eabeaffe4c2 |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (31e458cecb1ee908068a512aae377eabeaffe4c2): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
Weird, maybe it's just noise. whatever, let's also try the unlikely candidates |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (0f72f44d56cbdd8e6b219a1eb38b0aa705c90907): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
#106321 seems to be the culprit, the same tiny regressions in incr builds. Pretty weird since that shouldn't have touched the happy path but maybe something from the flushing changed it? Or do we sometimes delay bugs in some weird ways anyways even on the happy path? |
My understanding is that the code running I too am confused about why #106321 could have caused a performance impact. (We don't benchmark the compiler against type-incorrect code, do we? Even if we do/did, none of the flagged cases represent such instances...) I'm thus inclined to categorize this as noise and mark it as triaged; if @compiler-errors wants to look into it, that's fine, but we don't need to add it to our accumulated set of perf regression issues. @rustbot label: +perf-regression-triaged |
Successful merges:
delay_span_bug
s #106321 (Collect and emit proper backtraces fordelay_span_bug
s)impl
'swhere
clauses inconsider_impl_candidate
in experimental solver #106397 (Checkimpl
'swhere
clauses inconsider_impl_candidate
in experimental solver)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup