[llvm] [BOLT][AArch64] Skip gadget pacret test on RHEL8 (PR #145527)
Paschalis Mpeis via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 25 04:23:08 PDT 2025
paschalis-mpeis wrote:
Hey @atrosinenko,
Thanks a lot for your comment. Reading this back to see if I got it right.
**(1)** you are saying the following should (probably) work on RHEL8:
```diff
// CHECK-LABEL: GS-PAUTH: non-protected ret found in function f1, basic block {{[0-9a-zA-Z.]+}}, at address
// CHECK-NEXT: The instruction is {{[0-9a-f]+}}: ret
// CHECK-NEXT: The 1 instructions that write to the affected registers after any authentication are:
// CHECK-NEXT: 1. {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
// CHECK-NEXT: This happens in the following basic block:
// CHECK-NEXT: {{[0-9a-f]+}}: paciasp
+ // CHECK-NEXT: {{[0-9a-f]+}}: stp x29, x30, [sp, #-16]!
+ // CHECK-NEXT: {{[0-9a-f]+}}: mov x29, sp
+ // CHECK-NEXT: {{[0-9a-f]+}}: bl g
// CHECK-NEXT: {{[0-9a-f]+}}: add x0, x0, #0x3
// CHECK-NEXT: {{[0-9a-f]+}}: ldp x29, x30, [sp], #0x10
// CHECK-NEXT: {{[0-9a-f]+}}: ret
ret
```
**(2)** you're asking why on other platforms (non-RHEL8) a `bl` call splits the basic block?
So we should expect BOLT IR to produce a single block for `f1`. Given we achieve this consistently, we could add the above extra 3 lines to the test?
I can confirm that on my platform (a non-RHEL8 linux) I get two basic blocks in `f1`, where the `g` symbol is undefined. If replace the call target with something that exists (ie `f_intermediate_overwrite1`), I get a single block.
https://github.com/llvm/llvm-project/pull/145527
More information about the llvm-commits
mailing list