[llvm] [AArch64][BTI] Mark EH landing pads as jump targets (PR #149680)
Benjamin Herrenschmidt via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 20 22:36:06 PDT 2025
ozbenh wrote:
Same with llvm20 on Fedora:
Before:
```
.../...
400b70: 97ffff8a bl 400998 <__cxa_throw at plt>
400b74: 14000021 b 400bf8 <_fini>
400b78: f9000be0 str x0, [sp, #16]
400b7c: 2a0103e8 mov w8, w1
.../...
```
After:
```
400b70: 97ffff8a bl 400998 <__cxa_throw at plt>
400b74: 14000023 b 400c00 <_fini>
400b78: d503249f bti j
400b7c: f9000be0 str x0, [sp, #16]
400b80: 2a0103e8 mov w8, w1
```
But it's still crashing. I've confirmed that libgcc branches past the `bti` instruction:
```
=> 0xfffff7c57350 <_Unwind_RaiseException+260>: br x6
(gdb) p/x $x6
$2 = 0x400b7c
(gdb) x/i $x6
0x400b7c <main()+80>: str x0, [sp, #16]
(gdb) x/i $x6-8
0x400b74 <main()+72>: b 0x400c00 <_fini>
(gdb)
0x400b78 <main()+76>: bti j
(gdb)
0x400b7c <main()+80>: str x0, [sp, #16]
```
https://github.com/llvm/llvm-project/pull/149680
More information about the llvm-commits
mailing list