rust icon indicating copy to clipboard operation
rust copied to clipboard

Aarch64 call abi does not zeroext (and one cannot assume it does so)

Open pnkfelix opened this issue 2 years ago • 26 comments

Fix #97463

pnkfelix avatar Jun 06 '22 16:06 pnkfelix

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

rust-highfive avatar Jun 06 '22 16:06 rust-highfive

beta-nominating since this is a P-critical issue affecting a tier-1 target.

I'm also stable-nominating because I think we should at least have the discussion about whether we would want this included if there were a point release. (But I don't personally think the issue warrants making a point release.)

@rustbot label: beta-nominated stable-nominated

pnkfelix avatar Jun 06 '22 19:06 pnkfelix

I'm probably not a good reviewer for this, so going to r? rust-lang/compiler

Mark-Simulacrum avatar Jun 09 '22 13:06 Mark-Simulacrum

beta backport discussed in T-compiler and postponed to next week (Zulip discussion)

stable backport declined

@rustbot label -stable-nominated

apiraino avatar Jun 09 '22 14:06 apiraino

I think the test should really be a couple of codegen test (instead of testing using run-make-fulldeps) to ensure that we emit the same function signature as Clang does for a extern "C" function.

nbdd0121 avatar Jun 10 '22 20:06 nbdd0121

I disagree – the test should be a codegen test in addition to a test that actually verifies that the assumptions hold in practice. There's a good reason why we have a bunch of ABI tests that exercise behaviour at runtime.

nagisa avatar Jun 10 '22 23:06 nagisa

Yes, I agree with @nagisa : the run-make-fulldeps test is very fragile (in the sense that changes to the optimizations can cause the test to stop actually exercising that the proper change is in place), but it is a proper integration test.

I have now confirmed on my Apple M1 that the existing codegen tests even catch the mistake injected by this PR. Namely, I just tried to do a local x.py test src/test/codegen on my Apple M1 (with these patches cherry-picked), and got:

failures:
    [codegen] src/test/codegen/abi-repr-ext.rs
    [codegen] src/test/codegen/pic-relocation-model.rs

However, I think it will improve things a bit if I add a set of codegen tests specifically checking how i8/i16/u8/u16 are passed and returned. (I'm not quite sure yet how best to encode the variation between different targets on this front; it seems like the current strategy is to put variations into distinct files, each with the right set of // ignore-* directives.)

pnkfelix avatar Jun 15 '22 15:06 pnkfelix

(I'm not quite sure yet how best to encode the variation between different targets on this front; it seems like the current strategy is to put variations into distinct files, each with the right set of // ignore-* directives.)

Ah, thank goodness: that is not the only strategy available. I just discovered that in addition to the usual // CHECK: prefix, we also have target-specific checks, like so:

https://github.com/rust-lang/rust/blob/ca983054e19afd74d63c3ed37997f3bf30fe85d0/src/test/codegen/abi-efiapi.rs#L27-L33

(... though... can that encode the aarch64-apple-darwin vs aarch-unknown-linux-* distinction that we need here... I guess we will find out...)

pnkfelix avatar Jun 15 '22 22:06 pnkfelix

Beta backport revisited and declined as per compiler team on Zulip

@rustbot label -beta-nominated

apiraino avatar Jun 16 '22 14:06 apiraino

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)
configure: rust.debug-assertions := True
configure: rust.overflow-checks := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 
---
    Finished release [optimized] target(s) in 7.53s
tidy check
tidy: Skipping binary file check, read-only filesystem
Checking which error codes lack tests...
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision [unspecified] should not specify `needs-llvm-components:` as it doesn't need `--target`
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision aarch64-apple should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision aarch64-linux should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision aarch64-windows should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision arm should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision i686 should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision riscv should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision x86_64 should specify `needs-llvm-components:` as it has `--target` set
* highest error code: E0788
Found 505 error codes
Found 0 error(s) in error codes
Done!

rust-log-analyzer avatar Jun 30 '22 03:06 rust-log-analyzer

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)
configure: rust.debug-assertions := True
configure: rust.overflow-checks := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 
---
    Finished release [optimized] target(s) in 8.87s
tidy check
tidy: Skipping binary file check, read-only filesystem
Checking which error codes lack tests...
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision [unspecified] should not specify `needs-llvm-components:` as it doesn't need `--target`
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision aarch64-apple should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision aarch64-linux should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision aarch64-windows should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision arm should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision i686 should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision riscv should specify `needs-llvm-components:` as it has `--target` set
/checkout/src/test/codegen/some-abis-do-extend-params-to-32-bits.rs: revision x86_64 should specify `needs-llvm-components:` as it has `--target` set
* highest error code: E0788
Found 505 error codes
Found 0 error(s) in error codes
Done!

rust-log-analyzer avatar Jun 30 '22 04:06 rust-log-analyzer

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test result: ok. 174 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out; finished in 5.32s

 finished in 5.380 seconds
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
thread 'main' panicked at 'missing LLVM component: x86_64', src/tools/compiletest/src/header.rs:997:17
Build completed unsuccessfully in 0:10:38

rust-log-analyzer avatar Jun 30 '22 04:06 rust-log-analyzer

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test result: ok. 174 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out; finished in 5.16s

 finished in 5.220 seconds
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
thread 'main' panicked at 'missing LLVM component: i686', src/tools/compiletest/src/header.rs:997:17
Build completed unsuccessfully in 0:10:43

rust-log-analyzer avatar Jun 30 '22 04:06 rust-log-analyzer

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)
configure: rust.debug-assertions := True
configure: rust.overflow-checks := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 
---
Diff in /checkout/compiler/rustc_target/src/abi/call/aarch64.rs at line 95:
     arg.make_indirect();
 }
 
-pub fn compute_abi_info<'a, Ty, C>(
-    cx: &C,
-    fn_abi: &mut FnAbi<'a, Ty>,
-    param_policy: ParamExtension,
-) where
+pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>, param_policy: ParamExtension)
+where
     Ty: TyAbiInterface<'a, C> + Copy,
     C: HasDataLayout,
 {
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/compiler/rustc_target/src/abi/call/x86_64.rs" "/checkout/compiler/rustc_target/src/abi/call/avr.rs" "/checkout/compiler/rustc_target/src/abi/call/mips64.rs" "/checkout/compiler/rustc_target/src/abi/call/aarch64.rs" "/checkout/compiler/rustc_target/src/abi/call/amdgpu.rs" "/checkout/compiler/rustc_target/src/asm/mod.rs" "/checkout/compiler/rustc_target/src/asm/msp430.rs" "/checkout/compiler/rustc_target/src/abi/call/mips.rs"` failed.
Build completed unsuccessfully in 0:00:12
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.

rust-log-analyzer avatar Jul 05 '22 19:07 rust-log-analyzer

At this point I don't think its worth trying to coax a regression test out of some combination of ui + rust_test_helpers.c.

The original test case, as captured in the run-make-fulldeps test, is very fragile. I managed to replicate the problem but it is very sensitive to optimization settings for both the C and the Rust sides of things.

(I'm leaving in the work I did on trying to encode the existing regression test in that context, but I want to make it clear here that the provided encoding does not suffice to expose a regression here. That is, I cherry-picked it to a build without the commit that has the fix, and the test does not fail, which means its not a sufficient regression test on its own. Making it a proper regression test might be a simple matter of compiling rust_test_helpers.c with optimizations turned on; it is not clear.)

If someone wants to try to come up with an end-to-end test that is significant advance over what we have today, that is fine; but that can happen in a follow up PR. It should not block landing this PR, which does have sufficient tests now in my opinion.

pnkfelix avatar Jul 07 '22 02:07 pnkfelix

I agree that preference should be given to landing this fix over a complete regression test, as really, certain test suites should probably verify they cover multiple optimization levels automatically and ask for opt-out rather than opt-in to specific levels of optimization testing.

workingjubilee avatar Jul 18 '22 01:07 workingjubilee

@bors r=wesleywiser

pnkfelix avatar Aug 04 '22 14:08 pnkfelix

:pushpin: Commit 99c0f91a4dd235824c353a11a2e75c462c9bbb74 has been approved by wesleywiser

It is now in the queue for this repository.

bors avatar Aug 04 '22 14:08 bors

:hourglass: Testing commit 99c0f91a4dd235824c353a11a2e75c462c9bbb74 with merge 7875ce1e500effedcdbbe59fc12c03d70cef82ed...

bors avatar Aug 05 '22 12:08 bors

:broken_heart: Test failed - checks-actions

bors avatar Aug 05 '22 13:08 bors

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.rs ... ok
test [ui] src/test/ui/allocator/function-allocator.rs ... ok
test [ui] src/test/ui/allocator/not-an-allocator.rs ... ok
test [ui] src/test/ui/allocator/two-allocators.rs ... ok
test [ui] src/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs ... FAILED
test [ui] src/test/ui/abi/extern/extern-call-direct.rs ... ok
test [ui] src/test/ui/abi/x86stdcall2.rs ... ok
test [ui] src/test/ui/abi/abi-sysv64-arg-passing.rs ... ok
test [ui] src/test/ui/aligned_enum_cast.rs ... ok
---
test [ui] src/test/ui/wrong-hashset-issue-42918.rs ... ok

failures:

---- [ui] src/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs stdout ----
error: test compilation failed although it shouldn't!
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs" "-Zthreads=1" "--target=wasm32-unknown-unknown" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/a.wasm" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/auxiliary"
stdout: none
--- stderr -------------------------------
error: linking with `rust-lld` failed: exit status: 1
   |
   = note: "rust-lld" "-flavor" "wasm" "--rsp-quoting=posix" "--export" "main" "--export=__heap_base" "--export=__data_end" "-z" "stack-size=1048576" "--stack-first" "--allow-undefined" "--fatal-warnings" "--no-demangle" "--no-entry" "--export-dynamic" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/a.issue_97463_broken_abi_leaked_uninit_data.305a54f7-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/a.junm93kb3x49uh4.rcgu.o" "-L" "/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/auxiliary" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib" "-l" "rust_test_helpers" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libstd-522387fa7c52b7c4.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libpanic_abort-181955fd339dfa00.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libdlmalloc-f94f9803490a8303.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/librustc_demangle-983dcdf7e24affff.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libstd_detect-bf0cb248adf3b6fa.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libhashbrown-5934778f3092a6d5.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libminiz_oxide-2409eee3494f5458.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libadler-62cdd07647a4d9e4.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/librustc_std_workspace_alloc-112e5f81ab90ae0e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libunwind-5e1d5d17da3115db.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libcfg_if-7a5406a8308fb165.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/liblibc-1646056521a1f0e2.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/liballoc-09603881c584693a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/librustc_std_workspace_core-36b06538a2da70c9.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libcore-b523e6a4b101d4a1.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-8ce0e0cb86e194b0.rlib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/self-contained" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/a.wasm" "--gc-sections" "-O2" "--strip-debug"
   = note: rust-lld: error: unable to find library -lrust_test_helpers

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




failures:
    [ui] src/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs
test result: FAILED. 12659 passed; 1 failed; 665 ignored; 0 measured; 0 filtered out; finished in 88.84s

Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=wasm32-unknown-unknown
 finished in 89.315 seconds

rust-log-analyzer avatar Aug 05 '22 13:08 rust-log-analyzer

Ignored test on wasm.

@bors r+

wesleywiser avatar Aug 05 '22 14:08 wesleywiser

:pushpin: Commit 9bf3d5a82b689484b12bc5cc053d10f632ea6095 has been approved by wesleywiser

It is now in the queue for this repository.

bors avatar Aug 05 '22 14:08 bors

:hourglass: Testing commit 9bf3d5a82b689484b12bc5cc053d10f632ea6095 with merge 569f972ce966bb7eb98534a5eeff048a0a3cd587...

bors avatar Aug 05 '22 16:08 bors

:broken_heart: Test failed - checks-actions

bors avatar Aug 05 '22 16:08 bors

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] src/test/ui/allocator/allocator-args.rs ... ok
test [ui] src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.rs ... ok
test [ui] src/test/ui/allocator/two-allocators.rs ... ok
test [ui] src/test/ui/allocator/not-an-allocator.rs ... ok
test [ui] src/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs ... FAILED
test [ui] src/test/ui/abi/x86stdcall2.rs ... ok
test [ui] src/test/ui/aligned_enum_cast.rs ... ok
test [ui] src/test/ui/align-with-extern-c-fn.rs ... ok
test [ui] src/test/ui/abi/abi-sysv64-arg-passing.rs ... ok
---
test [ui] src/test/ui/wrong-hashset-issue-42918.rs ... ok

failures:

---- [ui] src/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs stdout ----
error: test compilation failed although it shouldn't!
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs" "-Zthreads=1" "--target=wasm32-unknown-unknown" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/a.wasm" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/auxiliary"
stdout: none
--- stderr -------------------------------
error: linking with `rust-lld` failed: exit status: 1
   |
   = note: "rust-lld" "-flavor" "wasm" "--rsp-quoting=posix" "--export" "main" "--export=__heap_base" "--export=__data_end" "-z" "stack-size=1048576" "--stack-first" "--allow-undefined" "--fatal-warnings" "--no-demangle" "--no-entry" "--export-dynamic" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/a.issue_97463_broken_abi_leaked_uninit_data.305a54f7-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/a.junm93kb3x49uh4.rcgu.o" "-L" "/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/auxiliary" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib" "-l" "rust_test_helpers" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libstd-522387fa7c52b7c4.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libpanic_abort-181955fd339dfa00.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libdlmalloc-f94f9803490a8303.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/librustc_demangle-983dcdf7e24affff.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libstd_detect-bf0cb248adf3b6fa.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libhashbrown-5934778f3092a6d5.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libminiz_oxide-2409eee3494f5458.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libadler-62cdd07647a4d9e4.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/librustc_std_workspace_alloc-112e5f81ab90ae0e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libunwind-5e1d5d17da3115db.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libcfg_if-7a5406a8308fb165.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/liblibc-1646056521a1f0e2.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/liballoc-09603881c584693a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/librustc_std_workspace_core-36b06538a2da70c9.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libcore-b523e6a4b101d4a1.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-8ce0e0cb86e194b0.rlib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib/self-contained" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data/a.wasm" "--gc-sections" "-O2" "--strip-debug"
   = note: rust-lld: error: unable to find library -lrust_test_helpers

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




failures:
    [ui] src/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs
test result: FAILED. 12659 passed; 1 failed; 665 ignored; 0 measured; 0 filtered out; finished in 89.70s

Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=wasm32-unknown-unknown
 finished in 90.235 seconds

rust-log-analyzer avatar Aug 05 '22 18:08 rust-log-analyzer

@wesleywiser says now that PR #100260 has landed, the // ignore-wasm directive may now actually get respected.

@bors retry

pnkfelix avatar Aug 11 '22 14:08 pnkfelix

@bors rollup=iffy

Dylan-DPC avatar Aug 14 '22 11:08 Dylan-DPC

:hourglass: Testing commit 9bf3d5a82b689484b12bc5cc053d10f632ea6095 with merge 9d483b1811cf52358802adc32f7b8c44b7f12437...

bors avatar Aug 15 '22 18:08 bors

:broken_heart: Test failed - checks-actions

bors avatar Aug 15 '22 18:08 bors

The job aarch64-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] src/test/ui/abi/foreign/foreign-dupe.rs ... ok
test [ui] src/test/ui/abi/numbers-arithmetic/i128-ffi.rs ... ok
test [ui] src/test/ui/abi/unsupported.rs#i686 ... ok
test [ui] src/test/ui/abi/unsupported.rs#arm ... ok
test [ui] src/test/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs ... ok
test [ui] src/test/ui/abi/foreign/invoke-external-foreign.rs ... ok
test [ui] src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.rs ... ok
test [ui] src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.rs ... ok
test [ui] src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.rs ... ok
---
test [codegen] src/test/codegen/simd-intrinsic/simd-intrinsic-generic-select.rs ... ok
test [codegen] src/test/codegen/slice-init.rs ... ok
test [codegen] src/test/codegen/slice-iter-len-eq-zero.rs ... ok
test [codegen] src/test/codegen/simd_arith_offset.rs ... ok
test [codegen] src/test/codegen/some-abis-do-extend-params-to-32-bits.rs#aarch64-linux ... ok
test [codegen] src/test/codegen/some-abis-do-extend-params-to-32-bits.rs#aarch64-apple ... ok
test [codegen] src/test/codegen/slice-ref-equality.rs ... ok
test [codegen] src/test/codegen/some-abis-do-extend-params-to-32-bits.rs#aarch64-windows ... ok
test [codegen] src/test/codegen/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs ... ok
test [codegen] src/test/codegen/some-abis-do-extend-params-to-32-bits.rs#arm ... ok
test [codegen] src/test/codegen/stack-probes.rs ... ignored
test [codegen] src/test/codegen/stack-probes.rs ... ignored
test [codegen] src/test/codegen/some-abis-do-extend-params-to-32-bits.rs#x86_64 ... ok
test [codegen] src/test/codegen/some-abis-do-extend-params-to-32-bits.rs#i686 ... ok
test [codegen] src/test/codegen/some-abis-do-extend-params-to-32-bits.rs#riscv ... ok
test [codegen] src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs ... ok
test [codegen] src/test/codegen/sparc-struct-abi.rs ... ok
test [codegen] src/test/codegen/swap-large-types.rs ... ignored
test [codegen] src/test/codegen/swap-simd-types.rs ... ignored
---
failures:

---- [codegen] src/test/codegen/abi-repr-ext.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/aarch64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen/abi-repr-ext/abi-repr-ext.ll" "/checkout/src/test/codegen/abi-repr-ext.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC"
stdout: none
--- stderr -------------------------------
/checkout/src/test/codegen/abi-repr-ext.rs:11:11: error: CHECK: expected string not found in input
// CHECK: define{{( dso_local)?}} noundef signext i8 @test()
          ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen/abi-repr-ext/abi-repr-ext.ll:1:1: note: scanning from here
; ModuleID = 'abi_repr_ext.d2cf9aa6-cgu.0'
^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen/abi-repr-ext/abi-repr-ext.ll:6:70: note: possible intended match here
; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind readnone willreturn uwtable

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen/abi-repr-ext/abi-repr-ext.ll
Check file: /checkout/src/test/codegen/abi-repr-ext.rs


-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
            1: ; ModuleID = 'abi_repr_ext.d2cf9aa6-cgu.0' 
check:11'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
            2: source_filename = "abi_repr_ext.d2cf9aa6-cgu.0" 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            3: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4: target triple = "aarch64-unknown-linux-gnu" 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5:  
check:11'0     ~
            6: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind readnone willreturn uwtable 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'1                                                                          ?                                   possible intended match
            7: define noundef i8 @test() unnamed_addr #0 { 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            8: start: 
check:11'0     ~~~~~~~
            9:  ret i8 0 
check:11'0     ~~~~~~~~~~
           10: } 
check:11'0     ~~
           11:  
check:11'0     ~
            .
            .
>>>>>>
------------------------------------------
------------------------------------------


---- [codegen] src/test/codegen/pic-relocation-model.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/aarch64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen/pic-relocation-model/pic-relocation-model.ll" "/checkout/src/test/codegen/pic-relocation-model.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC"
stdout: none
--- stderr -------------------------------
/checkout/src/test/codegen/pic-relocation-model.rs:13:11: error: CHECK: expected string not found in input
// CHECK: declare zeroext i8 @foreign_fn()
          ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen/pic-relocation-model/pic-relocation-model.ll:7:29: note: scanning from here
define i8 @call_foreign_fn() unnamed_addr #0 {
                            ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen/pic-relocation-model/pic-relocation-model.ll:9:5: note: possible intended match here
 %0 = tail call i8 @foreign_fn()


Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen/pic-relocation-model/pic-relocation-model.ll


-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
            1: ; ModuleID = 'pic_relocation_model.c32f04f8-cgu.0' 
            2: source_filename = "pic_relocation_model.c32f04f8-cgu.0" 
            3: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" 
            4: target triple = "aarch64-unknown-linux-gnu" 
            5:  
            6: ; Function Attrs: nonlazybind uwtable 
            7: define i8 @call_foreign_fn() unnamed_addr #0 { 
check:13'0                                 X~~~~~~~~~~~~~~~~~~ error: no match found
            8: start: 
check:13'0     ~~~~~~~
            9:  %0 = tail call i8 @foreign_fn() 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:13'1         ?                             possible intended match
           10:  ret i8 %0 
check:13'0     ~~~~~~~~~~~
           11: } 
check:13'0     ~~
           12:  
check:13'0     ~
           13: ; Function Attrs: nonlazybind uwtable 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           14: declare i8 @foreign_fn() unnamed_addr #0 
check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            .
            .
>>>>>>
------------------------------------------

rust-log-analyzer avatar Aug 15 '22 20:08 rust-log-analyzer

(I'm trying to look at this again now.)

pnkfelix avatar Aug 19 '22 16:08 pnkfelix

woot, I've replicated the problem on my AArch64 cloud desktop. So I'm pretty confident I can figure out what's up.

(With luck this will be "just" a matter of revising the test to reflect the actual expected reality.)

pnkfelix avatar Aug 19 '22 18:08 pnkfelix

@bors r=wesleywiser rollup=iffy

pnkfelix avatar Aug 19 '22 20:08 pnkfelix

:pushpin: Commit 59cc718e76faee1f844040d60615bacc6bad8643 has been approved by wesleywiser

It is now in the queue for this repository.

bors avatar Aug 19 '22 20:08 bors

@bors r- failed in a rollup https://github.com/rust-lang/rust/pull/100805#issuecomment-1221374410 https://github.com/rust-lang-ci/rust/runs/7933052480?check_suite_focus=true#step:25:37020

matthiaskrgr avatar Aug 20 '22 17:08 matthiaskrgr

@bors r+

wesleywiser avatar Aug 22 '22 15:08 wesleywiser

:pushpin: Commit ed9b12d7fd567c92c0c438714a19a53f035329d8 has been approved by wesleywiser

It is now in the queue for this repository.

bors avatar Aug 22 '22 15:08 bors