Skip to content

Fix coroutine MIR saved local remapping#158655

Open
dingxiangfei2009 wants to merge 2 commits into
rust-lang:mainfrom
dingxiangfei2009:fix-remapping
Open

Fix coroutine MIR saved local remapping#158655
dingxiangfei2009 wants to merge 2 commits into
rust-lang:mainfrom
dingxiangfei2009:fix-remapping

Conversation

@dingxiangfei2009

@dingxiangfei2009 dingxiangfei2009 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

View all comments

The unsound analysis was found while I was working on the async-drop code. Apparently the counter variable in the array drop glue is not correctly identified as a saved local.

Also we did not patch up indices in ProjectionElem::Index when they are saved locals.

The reproduction is in the older commit with the expected output.

@rustbot

rustbot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 1, 2026
@rustbot

rustbot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 15 candidates

@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

r? cjgillot

who probably has more context

@rustbot rustbot assigned cjgillot and unassigned TaKO8Ki Jul 1, 2026
@dingxiangfei2009 dingxiangfei2009 requested a review from cjgillot July 1, 2026 12:33
Comment thread compiler/rustc_mir_transform/src/coroutine/mod.rs Outdated
Comment thread compiler/rustc_mir_transform/src/coroutine/mod.rs Outdated
Comment thread tests/ui/async-await/async-drop/async-drop-initial.rs
@cjgillot cjgillot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 2, 2026
@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 3, 2026
Comment thread compiler/rustc_mir_transform/src/coroutine/mod.rs Outdated
Comment thread compiler/rustc_mir_transform/src/coroutine/mod.rs Outdated
Comment thread compiler/rustc_mir_transform/src/coroutine/mod.rs Outdated
Comment thread compiler/rustc_mir_transform/src/coroutine/mod.rs
Comment thread compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs
Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
@rustbot

rustbot commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Storage is still required even if the local is moved out and
immediately moved in again.

Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@dingxiangfei2009 dingxiangfei2009 requested a review from cjgillot July 6, 2026 10:54
@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

@cjgillot Thank you for your review!

I have applied the suggestions. Let me know any other outstanding concerns. Cheers!

@cjgillot

cjgillot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Great !
@bors r+

@dingxiangfei2009

dingxiangfei2009 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

@bors try jobs=aarch64-gnu-debug

@rust-bors

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Unknown command "jobs". Run @bors help or go to https://bors.rust-lang.org/help to see available commands.

@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

@bors try jobs=aarch64-gnu-debug

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 11, 2026
Fix coroutine MIR saved local remapping


try-job: aarch64-gnu-debug
@rust-bors

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 5f08f47 (5f08f47e109fef96c446a1db4e145e1e70bc4d71)
Base parent: acf6a00 (acf6a00aff5d8aa8892aadff0b48364b50f97cf4)

@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

@jhpratt Okay it looks like the previous failure was due to another PR in the rollup.

Shall we proceed?

@cjgillot

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 401dc21 has been approved by cjgillot

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 12, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
Fix coroutine MIR saved local remapping





The unsound analysis was found while I was working on the `async-drop` code. Apparently the counter variable in the array drop glue is not correctly identified as a saved local.

Also we did not patch up indices in `ProjectionElem::Index` when they are saved locals.

The reproduction is in the older commit with the expected output.
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 13, 2026
@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 71a41fd failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-android failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] smallvec test:false 0.208
   Compiling once_cell v1.21.3
error: rustc interrupted by SIGSEGV, printing backtrace

/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(+0x3ca1ccc)[0x7f3e308a1ccc]
/lib/x86_64-linux-gnu/libc.so.6(+0x45330)[0x7f3e2ca33330]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x12d13)[0x56429cd90d13]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvNtNtCsjzGIphIt0gv_13rustc_session6config15nightly_options21check_nightly_options+0x94)[0x7f3e331a8720]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl14handle_options+0xc4b)[0x7f3e331a671b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl12run_compiler+0x1da)[0x7f3e331a9f5a]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl4main+0x2ed)[0x7f3e331a317b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x331b3)[0x56429cdb11b3]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x331a9)[0x56429cdb11a9]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvNtCs69jEFU80eKj_3std2rt19lang_start_internal+0x34b)[0x7f3e3337a88f]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x71f77)[0x56429cdeff77]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca)[0x7f3e2ca181ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b)[0x7f3e2ca1828b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x71e86)[0x56429cdefe86]

note: we would appreciate a report at https://github.com/rust-lang/rust
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
[RUSTC-TIMING] shlex test:false 1.281
rustc exited with signal: 11 (SIGSEGV) (core dumped)
error: could not compile `shlex` (lib)

Caused by:
  process didn't exit successfully: `sccache /checkout/obj/build/bootstrap/debug/rustc --crate-name shlex --edition=2015 /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/shlex-1.3.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("default", "std"))' -C metadata=3ebc2f3f354e9a57 -C extra-filename=-29c32f9d0e222384 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/shlex/29c32f9d0e222384/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/shlex/29c32f9d0e222384/out --cap-lints allow -Z binary-dep-depinfo` (exit status: 254)
warning: build failed, waiting for other jobs to finish...
error: rustc interrupted by SIGSEGV, printing backtrace

/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(+0x3ca1ccc)[0x7fe1f66a1ccc]
/lib/x86_64-linux-gnu/libc.so.6(+0x45330)[0x7fe1f2833330]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x12d13)[0x55e24b009d13]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvNtNtCsjzGIphIt0gv_13rustc_session6config15nightly_options21check_nightly_options+0x94)[0x7fe1f8fa8720]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl14handle_options+0xc4b)[0x7fe1f8fa671b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl12run_compiler+0x1da)[0x7fe1f8fa9f5a]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl4main+0x2ed)[0x7fe1f8fa317b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x331b3)[0x55e24b02a1b3]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x331a9)[0x55e24b02a1a9]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvNtCs69jEFU80eKj_3std2rt19lang_start_internal+0x34b)[0x7fe1f917a88f]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x71f77)[0x55e24b068f77]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca)[0x7fe1f28181ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b)[0x7fe1f281828b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x71e86)[0x55e24b068e86]

note: we would appreciate a report at https://github.com/rust-lang/rust
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
[RUSTC-TIMING] stable_deref_trait test:false 1.099
rustc exited with signal: 11 (SIGSEGV) (core dumped)
error: could not compile `stable_deref_trait` (lib)

Caused by:
  process didn't exit successfully: `sccache /checkout/obj/build/bootstrap/debug/rustc --crate-name stable_deref_trait --edition=2015 /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/stable_deref_trait-1.2.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="default"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("alloc", "default", "std"))' -C metadata=f6bccd939587daa9 -C extra-filename=-7874355a3a0c5655 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/stable_deref_trait/7874355a3a0c5655/out --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/stable_deref_trait/7874355a3a0c5655/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/stable_deref_trait/7874355a3a0c5655/out --cap-lints allow --cfg=windows_raw_dylib -Zunstable-options '--check-cfg=cfg(bootstrap)' -Zmacro-backtrace -Csplit-debuginfo=off -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Clink-arg=-Wl,--compress-debug-sections=zlib -Alinker-messages -Zon-broken-pipe=kill --cfg=bootstrap -Z binary-dep-depinfo` (exit status: 254)
error: rustc interrupted by SIGSEGV, printing backtrace

/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(+0x3ca1ccc)[0x7f7a34aa1ccc]
/lib/x86_64-linux-gnu/libc.so.6(+0x45330)[0x7f7a30c33330]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x12d13)[0x55d22f15fd13]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvNtNtCsjzGIphIt0gv_13rustc_session6config15nightly_options21check_nightly_options+0x94)[0x7f7a373a8720]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl14handle_options+0xc4b)[0x7f7a373a671b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl12run_compiler+0x1da)[0x7f7a373a9f5a]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl4main+0x2ed)[0x7f7a373a317b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x331b3)[0x55d22f1801b3]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x331a9)[0x55d22f1801a9]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvNtCs69jEFU80eKj_3std2rt19lang_start_internal+0x34b)[0x7f7a3757a88f]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x71f77)[0x55d22f1bef77]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca)[0x7f7a30c181ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b)[0x7f7a30c1828b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x71e86)[0x55d22f1bee86]

note: we would appreciate a report at https://github.com/rust-lang/rust
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
[RUSTC-TIMING] once_cell test:false 0.366
rustc exited with signal: 11 (SIGSEGV) (core dumped)
error: rustc interrupted by SIGSEGV, printing backtrace

/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(+0x3ca1ccc)[0x7f6bd00a1ccc]
/lib/x86_64-linux-gnu/libc.so.6(+0x45330)[0x7f6bcc233330]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x12d13)[0x55a82fc68d13]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvNtNtCsjzGIphIt0gv_13rustc_session6config15nightly_options21check_nightly_options+0x94)[0x7f6bd29a8720]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl14handle_options+0xc4b)[0x7f6bd29a671b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl12run_compiler+0x1da)[0x7f6bd29a9f5a]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvCshnjiQGDZSn_17rustc_driver_impl4main+0x2ed)[0x7f6bd29a317b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x331b3)[0x55a82fc891b3]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x331a9)[0x55a82fc891a9]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/librustc_driver-dac142e19f50e6cc.so(_RNvNtCs69jEFU80eKj_3std2rt19lang_start_internal+0x34b)[0x7f6bd2b7a88f]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x71f77)[0x55a82fcc7f77]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca)[0x7f6bcc2181ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b)[0x7f6bcc21828b]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc(+0x71e86)[0x55a82fcc7e86]

note: we would appreciate a report at https://github.com/rust-lang/rust
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
[RUSTC-TIMING] quote test:false 1.173
rustc exited with signal: 11 (SIGSEGV) (core dumped)
error: could not compile `quote` (lib)

Caused by:
  process didn't exit successfully: `sccache /checkout/obj/build/bootstrap/debug/rustc --crate-name quote --edition=2021 /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="proc-macro"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("default", "proc-macro"))' -C metadata=b1aaae8f4220fdd8 -C extra-filename=-e804f208de340def --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/quote/e804f208de340def/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/proc-macro2/16786004ca9508fd/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/proc-macro2/a66bff7d5039ac61/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/proc-macro2/a81c7aa6e11837c3/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/quote/3f601622cf34cdba/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/quote/8497a78dc828f53e/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/quote/e804f208de340def/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/unicode-ident/d328bebad7fba1e8/out --extern proc_macro2=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/proc-macro2/a81c7aa6e11837c3/out/libproc_macro2-a81c7aa6e11837c3.rmeta --cap-lints allow -Z binary-dep-depinfo --check-cfg 'cfg(no_diagnostic_namespace)'` (exit status: 254)
error: could not compile `once_cell` (lib)

Caused by:
  process didn't exit successfully: `sccache /checkout/obj/build/bootstrap/debug/rustc --crate-name once_cell --edition=2021 /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/once_cell-1.21.3/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="default"' --cfg 'feature="race"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("alloc", "atomic-polyfill", "critical-section", "default", "parking_lot", "portable-atomic", "race", "std", "unstable"))' -C metadata=d7ab2042164969b2 -C extra-filename=-3d4c608d456d33e6 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/once_cell/3d4c608d456d33e6/out --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/once_cell/3d4c608d456d33e6/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/once_cell/3d4c608d456d33e6/out --cap-lints allow --cfg=windows_raw_dylib -Zunstable-options '--check-cfg=cfg(bootstrap)' -Zmacro-backtrace -Csplit-debuginfo=off -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Clink-arg=-Wl,--compress-debug-sections=zlib -Alinker-messages -Zon-broken-pipe=kill --cfg=bootstrap -Z binary-dep-depinfo` (exit status: 254)
Bootstrap failed while executing `dist --host= --target arm-linux-androideabi,armv7-linux-androideabi,thumbv7neon-linux-androideabi,i686-linux-android,aarch64-linux-android,x86_64-linux-android`
Currently active steps:
compile::Assemble { target_compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu, forced_compiler: false } } at src/bootstrap/src/core/build_steps/dist.rs:850
compile::Rustc { target: x86_64-unknown-linux-gnu, build_compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, crates: [] } at src/bootstrap/src/core/build_steps/compile.rs:2332
Build completed unsuccessfully in 0:11:31
  local time: Mon Jul 13 03:13:22 UTC 2026

@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

Hmm spicy segv... I will look into this

@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

@bors try jobs=dist-android

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
Fix coroutine MIR saved local remapping


try-job: dist-android
@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 5a605f6 (5a605f6594a18d7c99c53387bc82e3baa7caabd2)
Base parent: 48c2cee (48c2cee70232ecc3a6a8e285b2e15620b39f82a7)

@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

@bors r+

I think CI experienced some memory pressure.

@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 401dc21 has been approved by dingxiangfei2009

It is now in the queue for this repository.

A failed build status on this PR was cleared due to the approval.

@rust-bors rust-bors Bot 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 Jul 13, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 13, 2026
…dingxiangfei2009

Fix coroutine MIR saved local remapping

The unsound analysis was found while I was working on the `async-drop` code. Apparently the counter variable in the array drop glue is not correctly identified as a saved local.

Also we did not patch up indices in `ProjectionElem::Index` when they are saved locals.

The reproduction is in the older commit with the expected output.
rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
Rollup of 11 pull requests

Successful merges:

 - #159210 (`rust-analyzer` subtree update)
 - #158655 (Fix coroutine MIR saved local remapping)
 - #159205 (bootstrap: Replace `ShouldRun::crates` with `crate_or_deps_filtered`)
 - #159208 (Fix `attr_on_non_tail_expr` typo)
 - #157524 (Fix relative paths in private import suggestions)
 - #158325 (Document NonNull layout guarantees)
 - #158882 (enable `do_not_recommend` attr for method call errors in current solver)
 - #158982 (Pretty-print MIR user types too.)
 - #159069 (Add codegen test for constant returns after local use)
 - #159163 (rustc_target: Add acquire-release to implied features of v8)
 - #159201 (borrowck: Represent 'best blame constraint' as index into `Vec<OutlivesConstraint>`)
rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
Rollup of 11 pull requests

Successful merges:

 - #159210 (`rust-analyzer` subtree update)
 - #158655 (Fix coroutine MIR saved local remapping)
 - #159205 (bootstrap: Replace `ShouldRun::crates` with `crate_or_deps_filtered`)
 - #159208 (Fix `attr_on_non_tail_expr` typo)
 - #157524 (Fix relative paths in private import suggestions)
 - #158325 (Document NonNull layout guarantees)
 - #158882 (enable `do_not_recommend` attr for method call errors in current solver)
 - #158982 (Pretty-print MIR user types too.)
 - #159069 (Add codegen test for constant returns after local use)
 - #159163 (rustc_target: Add acquire-release to implied features of v8)
 - #159201 (borrowck: Represent 'best blame constraint' as index into `Vec<OutlivesConstraint>`)
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants