Skip to content
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

aarch64-pointer-auth test failing on LLVM 19 #127829

Closed
durin42 opened this issue Jul 16, 2024 · 1 comment · Fixed by #128141
Closed

aarch64-pointer-auth test failing on LLVM 19 #127829

durin42 opened this issue Jul 16, 2024 · 1 comment · Fixed by #128141
Assignees
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-AArch64 Armv8-A or later processors in AArch64 mode T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@durin42
Copy link
Contributor

durin42 commented Jul 16, 2024

Our CI has noticed that llvm/llvm-project@e15d67c broke tests/assembly/aarch64-pointer-auth.rs:

/var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/tests/assembly/aarch64-pointer-auth.rs:16:11: error: CHECK: expected string not found in input
  | // CHECK: hint #25
  | ^
  | /var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/build/x86_64-unknown-linux-gnu/test/assembly/aarch64-pointer-auth/aarch64-pointer-auth.s:1:1: note: scanning from here
  | .text
  | ^
  | /var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/build/x86_64-unknown-linux-gnu/test/assembly/aarch64-pointer-auth/aarch64-pointer-auth.s:14:18: note: possible intended match here
  | .file "aarch64_pointer_auth.ed114bba7a018068-cgu.0"
  | ^
  |  
  | Input file: /var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/build/x86_64-unknown-linux-gnu/test/assembly/aarch64-pointer-auth/aarch64-pointer-auth.s
  | Check file: /var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/tests/assembly/aarch64-pointer-auth.rs

The only diff in the .s file is this:

--- working	2024-07-16 16:26:17.914057368 -0400
+++ broken	2024-07-16 15:35:19.788461411 -0400
@@ -18,11 +18,7 @@
 	.type	test,@function
 test:
 	.cfi_startproc
-	hint	#25
-	.cfi_negate_ra_state
 	mov	w0, #42
-	hint	#29
-	.cfi_negate_ra_state
 	ret
 .Lfunc_end0:
 	.size	test, .Lfunc_end0-test

So somehow something is causing the hint instructions to get dropped, which is the only thing the test actually looks for. I'm short on time today, but at least wanted to report this semi-promptly. I may look more soon.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 16, 2024
@saethlin saethlin added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. O-AArch64 Armv8-A or later processors in AArch64 mode and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 16, 2024
@nikic
Copy link
Contributor

nikic commented Jul 17, 2024

We now need to also generate function attributes for this, instead of only the module metadata.

@nikic nikic self-assigned this Jul 24, 2024
@bors bors closed this as completed in 6b23cb5 Jul 30, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jul 30, 2024
Rollup merge of rust-lang#128141 - nikic:aarch64-bti, r=DianQK,cuviper

Set branch protection function attributes

Since LLVM 19, it is necessary to set not only module flags, but also function attributes for branch protection on aarch64. See llvm/llvm-project@e15d67c for the relevant LLVM change.

Fixes rust-lang#127829.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-AArch64 Armv8-A or later processors in AArch64 mode T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants