Skip to content

Stage0 bootstrap update #140887

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

pietroalbini
Copy link
Member

This PR follows the release process to update the stage0 compiler.

The only thing of note is 58651d1, which was flagged by clippy as a correctness fix. I think allowing that lint in our case makes sense, but it's worth to have a second pair of eyes on it.

r? @Mark-Simulacrum

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 10, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 10, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred in compiler/rustc_attr_data_structures

cc @jdonszelmann

Some changes occurred in library/core/src/fmt/rt.rs

cc @m-ou-se

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

Some changes occurred to the platform-builtins intrinsics. Make sure the
LLVM backend as well as portable-simd gets adapted for the changes.

cc @antoyo, @GuillaumeGomez, @bjorn3, @calebzulawski, @programmerjake

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling std v0.0.0 (/checkout/library/std)
[RUSTC-TIMING] build_script_build test:false 0.315
[RUSTC-TIMING] build_script_build test:false 0.196
[RUSTC-TIMING] build_script_build test:false 0.463
error: internal compiler error: compiler/rustc_mir_transform/src/elaborate_drop.rs:1254:18: open drop from non-ADT `T/#0`
  --> library/core/src/future/async_drop.rs:46:70
   |
46 |   pub async unsafe fn async_drop_in_place<T: ?Sized>(_to_drop: *mut T) {
   |  ______________________________________________________________________^
...  |
49 | | }
   | |_^

---
   4:     0x7f80c15665ca - std::panicking::default_hook::{{closure}}::h1caf4dc93f5df6e2
   5:     0x7f80c156614f - std::panicking::default_hook::hc859463e9f93c551
   6:     0x7f80c0591ea3 - std[66983a05574cb497]::panicking::update_hook::<alloc[56c52fff682d8c3a]::boxed::Box<rustc_driver_impl[62fb5942fbfb5aad]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7f80c1566e43 - std::panicking::rust_panic_with_hook::h1f4a45f27662063e
   8:     0x7f80c05ce251 - std[66983a05574cb497]::panicking::begin_panic::<rustc_errors[f1ec75722d6dd023]::ExplicitBug>::{closure#0}
   9:     0x7f80c05c2126 - std[66983a05574cb497]::sys::backtrace::__rust_end_short_backtrace::<std[66983a05574cb497]::panicking::begin_panic<rustc_errors[f1ec75722d6dd023]::ExplicitBug>::{closure#0}, !>
  10:     0x7f80c05beb4b - std[66983a05574cb497]::panicking::begin_panic::<rustc_errors[f1ec75722d6dd023]::ExplicitBug>
  11:     0x7f80c05d88d1 - <rustc_errors[f1ec75722d6dd023]::diagnostic::BugAbort as rustc_errors[f1ec75722d6dd023]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7f80c0ba85cc - <rustc_errors[f1ec75722d6dd023]::DiagCtxtHandle>::span_bug::<rustc_span[6a1d6a110b6aca67]::span_encoding::Span, alloc[56c52fff682d8c3a]::string::String>
  13:     0x7f80c0c479f7 - rustc_middle[1067557b42e534f3]::util::bug::opt_span_bug_fmt::<rustc_span[6a1d6a110b6aca67]::span_encoding::Span>::{closure#0}
  14:     0x7f80c0c2008a - rustc_middle[1067557b42e534f3]::ty::context::tls::with_opt::<rustc_middle[1067557b42e534f3]::util::bug::opt_span_bug_fmt<rustc_span[6a1d6a110b6aca67]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  15:     0x7f80c0c1fefb - rustc_middle[1067557b42e534f3]::ty::context::tls::with_context_opt::<rustc_middle[1067557b42e534f3]::ty::context::tls::with_opt<rustc_middle[1067557b42e534f3]::util::bug::opt_span_bug_fmt<rustc_span[6a1d6a110b6aca67]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  16:     0x7f80bf0746b7 - rustc_middle[1067557b42e534f3]::util::bug::span_bug_fmt::<rustc_span[6a1d6a110b6aca67]::span_encoding::Span>
  17:     0x7f80c26f2ae4 - <rustc_mir_transform[d7bad6921de1c649]::elaborate_drop::DropCtxt<rustc_mir_transform[d7bad6921de1c649]::shim::DropShimElaborator>>::elaborate_drop
  18:     0x7f80c26ec740 - rustc_mir_transform[d7bad6921de1c649]::shim::make_shim
  19:     0x7f80c26ea72f - rustc_query_impl[99e709fd2c95bd1b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[99e709fd2c95bd1b]::query_impl::mir_shims::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1067557b42e534f3]::query::erase::Erased<[u8; 8usize]>>
  20:     0x7f80c26ea6e7 - <rustc_query_impl[99e709fd2c95bd1b]::query_impl::mir_shims::dynamic_query::{closure#2} as core[67cbd9a33c220f3c]::ops::function::FnOnce<(rustc_middle[1067557b42e534f3]::ty::context::TyCtxt, rustc_middle[1067557b42e534f3]::ty::instance::InstanceKind)>>::call_once
  21:     0x7f80c258879e - rustc_query_system[ed2fdcf906472910]::query::plumbing::try_execute_query::<rustc_query_impl[99e709fd2c95bd1b]::DynamicConfig<rustc_query_system[ed2fdcf906472910]::query::caches::DefaultCache<rustc_middle[1067557b42e534f3]::ty::instance::InstanceKind, rustc_middle[1067557b42e534f3]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[99e709fd2c95bd1b]::plumbing::QueryCtxt, false>
  22:     0x7f80c25884bc - rustc_query_impl[99e709fd2c95bd1b]::query_impl::mir_shims::get_query_non_incr::__rust_end_short_backtrace
  23:     0x7f80c0c44869 - <rustc_middle[1067557b42e534f3]::ty::context::TyCtxt>::coroutine_layout
  24:     0x7f80c2428723 - rustc_ty_utils[db228e938abc6777]::layout::layout_of_uncached
  25:     0x7f80c241b60e - rustc_ty_utils[db228e938abc6777]::layout::layout_of
  26:     0x7f80c241b56c - rustc_query_impl[99e709fd2c95bd1b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[99e709fd2c95bd1b]::query_impl::layout_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1067557b42e534f3]::query::erase::Erased<[u8; 16usize]>>
  27:     0x7f80c241a38f - rustc_query_system[ed2fdcf906472910]::query::plumbing::try_execute_query::<rustc_query_impl[99e709fd2c95bd1b]::DynamicConfig<rustc_query_system[ed2fdcf906472910]::query::caches::DefaultCache<rustc_middle[1067557b42e534f3]::ty::PseudoCanonicalInput<rustc_middle[1067557b42e534f3]::ty::Ty>, rustc_middle[1067557b42e534f3]::query::erase::Erased<[u8; 16usize]>>, false, true, false>, rustc_query_impl[99e709fd2c95bd1b]::plumbing::QueryCtxt, false>
  28:     0x7f80c2419fe5 - rustc_query_impl[99e709fd2c95bd1b]::query_impl::layout_of::get_query_non_incr::__rust_end_short_backtrace
  29:     0x7f80c2765554 - <rustc_const_eval[68989215dfab344a]::interpret::eval_context::InterpCx<rustc_const_eval[68989215dfab344a]::const_eval::dummy_machine::DummyMachine> as rustc_middle[1067557b42e534f3]::ty::layout::LayoutOf>::spanned_layout_of
  30:     0x7f80c0e3b4d3 - <rustc_mir_transform[d7bad6921de1c649]::dataflow_const_prop::Collector>::try_make_constant
  31:     0x7f80c0e39ff5 - <rustc_mir_transform[d7bad6921de1c649]::dataflow_const_prop::Collector as rustc_mir_dataflow[81d1b523db86c488]::framework::visitor::ResultsVisitor<rustc_mir_transform[d7bad6921de1c649]::dataflow_const_prop::ConstAnalysis>>::visit_after_primary_statement_effect
  32:     0x7f80c0e3cefa - <rustc_mir_transform[d7bad6921de1c649]::dataflow_const_prop::DataflowConstProp as rustc_mir_transform[d7bad6921de1c649]::pass_manager::MirPass>::run_pass
  33:     0x7f80c1c0383d - rustc_mir_transform[d7bad6921de1c649]::pass_manager::run_passes_inner
  34:     0x7f80c25e8c87 - rustc_mir_transform[d7bad6921de1c649]::run_optimization_passes
  35:     0x7f80c25e657b - rustc_mir_transform[d7bad6921de1c649]::optimized_mir
  36:     0x7f80c25e611d - rustc_query_impl[99e709fd2c95bd1b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[99e709fd2c95bd1b]::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1067557b42e534f3]::query::erase::Erased<[u8; 8usize]>>
  37:     0x7f80c20ed6ff - rustc_query_system[ed2fdcf906472910]::query::plumbing::try_execute_query::<rustc_query_impl[99e709fd2c95bd1b]::DynamicConfig<rustc_query_system[ed2fdcf906472910]::query::caches::DefIdCache<rustc_middle[1067557b42e534f3]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[99e709fd2c95bd1b]::plumbing::QueryCtxt, false>
  38:     0x7f80c20ecb22 - rustc_query_impl[99e709fd2c95bd1b]::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace
  39:     0x7f80c2582bec - <rustc_middle[1067557b42e534f3]::ty::context::TyCtxt>::instance_mir
  40:     0x7f80c1f20d9f - rustc_interface[723b69ee9f7cb1a4]::passes::run_required_analyses
  41:     0x7f80c2c713de - rustc_interface[723b69ee9f7cb1a4]::passes::analysis
  42:     0x7f80c2c713b5 - rustc_query_impl[99e709fd2c95bd1b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[99e709fd2c95bd1b]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1067557b42e534f3]::query::erase::Erased<[u8; 0usize]>>
  43:     0x7f80c2bddaba - rustc_query_system[ed2fdcf906472910]::query::plumbing::try_execute_query::<rustc_query_impl[99e709fd2c95bd1b]::DynamicConfig<rustc_query_system[ed2fdcf906472910]::query::caches::SingleCache<rustc_middle[1067557b42e534f3]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[99e709fd2c95bd1b]::plumbing::QueryCtxt, false>
  44:     0x7f80c2bdd78f - rustc_query_impl[99e709fd2c95bd1b]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  45:     0x7f80c2ebb187 - rustc_interface[723b69ee9f7cb1a4]::passes::create_and_enter_global_ctxt::<core[67cbd9a33c220f3c]::option::Option<rustc_interface[723b69ee9f7cb1a4]::queries::Linker>, rustc_driver_impl[62fb5942fbfb5aad]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  46:     0x7f80c2dc97a6 - rustc_interface[723b69ee9f7cb1a4]::interface::run_compiler::<(), rustc_driver_impl[62fb5942fbfb5aad]::run_compiler::{closure#0}>::{closure#1}
  47:     0x7f80c2d642be - std[66983a05574cb497]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[723b69ee9f7cb1a4]::util::run_in_thread_with_globals<rustc_interface[723b69ee9f7cb1a4]::util::run_in_thread_pool_with_globals<rustc_interface[723b69ee9f7cb1a4]::interface::run_compiler<(), rustc_driver_impl[62fb5942fbfb5aad]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  48:     0x7f80c2d64734 - <<std[66983a05574cb497]::thread::Builder>::spawn_unchecked_<rustc_interface[723b69ee9f7cb1a4]::util::run_in_thread_with_globals<rustc_interface[723b69ee9f7cb1a4]::util::run_in_thread_pool_with_globals<rustc_interface[723b69ee9f7cb1a4]::interface::run_compiler<(), rustc_driver_impl[62fb5942fbfb5aad]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[67cbd9a33c220f3c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  49:     0x7f80c2d65b2b - std::sys::pal::unix::thread::Thread::new::thread_start::h00210e921546d8d8
  50:     0x7f80bca6bac3 - <unknown>
  51:     0x7f80bcafd850 - <unknown>
  52:                0x0 - <unknown>

---
warning: the ICE couldn't be written to `/checkout/rustc-ice-2025-05-10T09_10_43-2198.txt`: Read-only file system (os error 30)

note: rustc 1.88.0-beta.1 (be8721b77 2025-05-09) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debug-assertions=on -C symbol-mangling-version=legacy -Z unstable-options -Z macro-backtrace -C split-debuginfo=off -C prefer-dynamic -Z validate-mir -Z mir-opt-level=3 -Z inline-mir -Z inline-mir-preserve-debug -Z mir_strip_debuginfo=locals-in-tiny-functions -C force-frame-pointers=yes -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z force-unstable-if-unmarked

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [mir_shims] generating MIR shim for `future::async_drop::async_drop_in_place::{closure#0}`, instance=AsyncDropGlue(DefId(0:15252 ~ core[8e9b]::future::async_drop::async_drop_in_place::{closure#0}), Coroutine(DefId(0:15252 ~ core[8e9b]::future::async_drop::async_drop_in_place::{closure#0}), [T/#0, (), future::ResumeTy, (), (), CoroutineWitness(DefId(0:15252 ~ core[8e9b]::future::async_drop::async_drop_in_place::{closure#0}), [T/#0]), (*mut T/#0,)]))
#1 [layout_of] computing layout of `{async fn body of future::async_drop::async_drop_in_place<T>()}`
... and 2 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
[RUSTC-TIMING] core test:false 10.080
error: could not compile `core` (lib)

Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc /checkout/obj/build/bootstrap/debug/rustc --crate-name core --edition=2024 library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 --warn=unexpected_cfgs --check-cfg 'cfg(bootstrap)' --check-cfg 'cfg(no_fp_fmt_parse)' --check-cfg 'cfg(feature, values(any()))' -C debug-assertions=on --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("debug_refcell", "debug_typeid", "optimize_for_size", "panic_immediate_abort"))' -C metadata=ac525840cd50f79f -C extra-filename=-424f5a3d8694c39e --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-std/aarch64-unknown-linux-gnu/release/deps --target aarch64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-std/aarch64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-std/release/deps --cfg=bootstrap -Csymbol-mangling-version=legacy '--check-cfg=cfg(feature,values(any()))' -Zunstable-options '--check-cfg=cfg(bootstrap)' -Zmacro-backtrace -Csplit-debuginfo=off -Cprefer-dynamic -Zvalidate-mir -Zmir-opt-level=3 -Zinline-mir -Zinline-mir-preserve-debug -Zmir_strip_debuginfo=locals-in-tiny-functions -Cforce-frame-pointers=yes '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo` (exit status: 101)
Build completed unsuccessfully in 0:00:43
  local time: Sat May 10 09:10:53 UTC 2025
  network time: Sat, 10 May 2025 09:10:53 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@jieyouxu
Copy link
Member

jieyouxu commented May 10, 2025

cc @azhogin @oli-obk is there anyway we can unblock the stage 0 bootstrap bump? #123948 is kinda massive, and there's been more PRs over that...

@Noratrieb
Copy link
Member

also @zetanumbers @petrochenkov since you were also involved with async drop. for some reason there is an ICE when compiling the standard library after the bootstrap bump, could you take a look at it? ideally there's some small bugfix that can be backported to beta

#140887 (comment)

@moxian
Copy link
Contributor

moxian commented May 10, 2025

Minimized repro, in case it helps: #140423 (comment)

@oli-obk
Copy link
Contributor

oli-obk commented May 10, 2025

On mobile for the next 6h, so I cant provide PRs, but just early return from the async mir shim code to produce a dummy mir body. Not dropping anything isn't worse than before the PR and we'll fix it on nightly again. No stable code is affected by essentially disabling the feature on beta

@est31
Copy link
Member

est31 commented May 10, 2025

The only thing of note is 58651d1, which was flagged by clippy as a correctness fix. I think allowing that lint in our case makes sense

I'd say the code is sound, as a Cell is involved. So it's a false positive of the mut_from_ref lint. In fact memory allocators are listed in the known problems section.

@oli-obk
Copy link
Contributor

oli-obk commented May 11, 2025

you can take the fix from #140902 it's hacky but it does the job with no risk and we'll fix it cleanly on master

@pietroalbini
Copy link
Member Author

Prepared the backport PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants