Skip to content

Don't include global asm in mir_keys, fix error body synthesis #137502

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Mar 9, 2025

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Feb 23, 2025

r? oli-obk

Fixes #137470
Fixes #137471
Fixes #137472
Fixes #137473

try-job: test-various
try-job: x86_64-apple-2

@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 Feb 23, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 23, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@compiler-errors compiler-errors force-pushed the global-asm-aint-mir-body branch from bc7b8f4 to f68ff69 Compare February 25, 2025 18:13
@compiler-errors
Copy link
Member Author

@bors r=oli-obk rollup

@bors
Copy link
Collaborator

bors commented Feb 25, 2025

📌 Commit f68ff69 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors 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 Feb 25, 2025
fmease added a commit to fmease/rust that referenced this pull request Feb 26, 2025
…r-body, r=oli-obk

Don't include global asm in `mir_keys`, fix error body synthesis

r? oli-obk

Fixes rust-lang#137470
Fixes rust-lang#137471
Fixes rust-lang#137472
Fixes rust-lang#137473
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2025
Rollup of 13 pull requests

Successful merges:

 - rust-lang#136576 (pass optimization level to llvm-bitcode-linker)
 - rust-lang#137320 (fix(rustdoc): Fixed stability version in rustdoc)
 - rust-lang#137502 (Don't include global asm in `mir_keys`, fix error body synthesis)
 - rust-lang#137529 (remove few unused args)
 - rust-lang#137544 (tests: Add regression test for derive token invalidation (rust-lang#81099))
 - rust-lang#137559 (run some tests on emscripten again)
 - rust-lang#137601 (ssa/mono: deduplicate `type_has_metadata`)
 - rust-lang#137603 (codegen_llvm: avoid `Deref` impls w/ extern type)
 - rust-lang#137604 (trait_sel: resolve vars in host effects)
 - rust-lang#137609 (Complete the list of resources used in rustdoc output)
 - rust-lang#137613 (hir_analysis: skip self type of host effect preds in variances_of)
 - rust-lang#137614 (fix doc in library/core/src/pin.rs)
 - rust-lang#137622 (fix attribute-related ICE when parsing macro on the rhs of a name-value attribute)

r? `@ghost`
`@rustbot` modify labels: rollup
@fmease
Copy link
Member

fmease commented Feb 26, 2025

tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#instrument failed on aarch64-apple in rollup #137649 with:

---- [ui] tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#instrument stdout ----
error in revision `instrument`: test compilation failed although it shouldn't!
status: exit status: 1
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--cfg" "instrument" "--check-cfg" "cfg(test,FALSE,emit_mir,instrument,cfi)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/global-asm-isnt-really-a-mir-body.instrument" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-Cinstrument-coverage" "-Zno-profiler-runtime"
--- stderr -------------------------------
error: linking with `cc` failed: exit status: 1
   |
   |
   = note:  "cc" "/var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T/rustchOsAJj/symbols.o" "<1 object files omitted>" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libstd-d16fc3ab99251824.dylib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/{libcompiler_builtins-*}.rlib" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-o" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/global-asm-isnt-really-a-mir-body.instrument/global-asm-isnt-really-a-mir-body" "-Wl,-dead_strip" "-nodefaultlibs" "-Wl,-rpath,@loader_path/../../../../stage2/lib/rustlib/aarch64-apple-darwin/lib"
   = note: Undefined symbols for architecture arm64:
   = note: Undefined symbols for architecture arm64:
             "___llvm_profile_raw_version", referenced from:
           ld: symbol(s) not found for architecture arm64
           ld: symbol(s) not found for architecture arm64
           clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to 1 previous error
------------------------------------------

#137649 (comment)

@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 26, 2025
@fmease
Copy link
Member

fmease commented Feb 26, 2025

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2025
…body, r=<try>

Don't include global asm in `mir_keys`, fix error body synthesis

r? oli-obk

Fixes rust-lang#137470
Fixes rust-lang#137471
Fixes rust-lang#137472
Fixes rust-lang#137473

try-job: aarch64-apple
@bors
Copy link
Collaborator

bors commented Feb 26, 2025

⌛ Trying commit f68ff69 with merge e4f2b0d...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Feb 26, 2025

💔 Test failed - checks-actions

@compiler-errors compiler-errors force-pushed the global-asm-aint-mir-body branch from f68ff69 to dc9d559 Compare March 4, 2025 00:01
@compiler-errors
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 4, 2025
…body, r=<try>

Don't include global asm in `mir_keys`, fix error body synthesis

r? oli-obk

Fixes rust-lang#137470
Fixes rust-lang#137471
Fixes rust-lang#137472
Fixes rust-lang#137473

try-job: aarch64-apple
@bors
Copy link
Collaborator

bors commented Mar 4, 2025

⌛ Trying commit dc9d559 with merge 941dad3...

@bors
Copy link
Collaborator

bors commented Mar 4, 2025

☀️ Try build successful - checks-actions
Build commit: 941dad3 (941dad302e3a02bb8d9d37593d97435f52fbbe62)

@compiler-errors
Copy link
Member Author

@bors r=oli-obk rollup

@bors
Copy link
Collaborator

bors commented Mar 4, 2025

📌 Commit dc9d559 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 4, 2025
@bors
Copy link
Collaborator

bors commented Mar 6, 2025

⌛ Trying commit d9902e5 with merge f294e1d...

@compiler-errors compiler-errors force-pushed the global-asm-aint-mir-body branch from d9902e5 to ef031c8 Compare March 6, 2025 17:34
@compiler-errors
Copy link
Member Author

@bors try

@bors
Copy link
Collaborator

bors commented Mar 6, 2025

⌛ Trying commit ef031c8 with merge ea5d883...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 6, 2025
…body, r=<try>

Don't include global asm in `mir_keys`, fix error body synthesis

r? oli-obk

Fixes rust-lang#137470
Fixes rust-lang#137471
Fixes rust-lang#137472
Fixes rust-lang#137473

try-job: test-various
try-job: x86_64-apple-2
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Mar 6, 2025

💔 Test failed - checks-actions

@compiler-errors
Copy link
Member Author

Poorly written test is matching a hash ending with "f" lmao

@compiler-errors
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2025
…body, r=<try>

Don't include global asm in `mir_keys`, fix error body synthesis

r? oli-obk

Fixes rust-lang#137470
Fixes rust-lang#137471
Fixes rust-lang#137472
Fixes rust-lang#137473

try-job: test-various
try-job: x86_64-apple-2
@bors
Copy link
Collaborator

bors commented Mar 7, 2025

⌛ Trying commit 5339d4e with merge 2ffe366...

@bors
Copy link
Collaborator

bors commented Mar 7, 2025

☀️ Try build successful - checks-actions
Build commit: 2ffe366 (2ffe366b2f4e59ac2d645743b460575bf86bb0dc)

@compiler-errors
Copy link
Member Author

@bors r=oli-obk rollup=iffy

@bors
Copy link
Collaborator

bors commented Mar 7, 2025

📌 Commit 5339d4e has been approved by oli-obk

It is now in the queue for this repository.

@bors bors 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 Mar 7, 2025
@bors
Copy link
Collaborator

bors commented Mar 8, 2025

⌛ Testing commit 5339d4e with merge dea1661...

@bors
Copy link
Collaborator

bors commented Mar 9, 2025

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing dea1661 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 9, 2025
@bors bors merged commit dea1661 into rust-lang:master Mar 9, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 9, 2025
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

gh pr comment ${HEAD_PR} -F output.log
shell: /usr/bin/bash -e {0}
##[endgroup]
fatal: ambiguous argument 'HEAD^1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
##[error]Process completed with exit code 128.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (dea1661): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary -2.3%)

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary -0.2%)

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.8% [1.8%, 1.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 765.938s -> 765.603s (-0.04%)
Artifact size: 362.04 MiB -> 361.95 MiB (-0.02%)

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 10, 2025
…g, r=oli-obk

Pass `InferCtxt` to `InlineAsmCtxt` to properly taint on error

Pass an `InferCtxt` into the `InlineAsmCtxt` so that we can use the right dcx to taint the infcx properly, so that we don't try to build invalid MIR for inline asm blocks.

Fixes rust-lang#138130

Shares the first commit with rust-lang#137502.

r? oli-obk
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 10, 2025
Rollup merge of rust-lang#138138 - compiler-errors:inline-asm-tainting, r=oli-obk

Pass `InferCtxt` to `InlineAsmCtxt` to properly taint on error

Pass an `InferCtxt` into the `InlineAsmCtxt` so that we can use the right dcx to taint the infcx properly, so that we don't try to build invalid MIR for inline asm blocks.

Fixes rust-lang#138130

Shares the first commit with rust-lang#137502.

r? oli-obk
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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
8 participants