[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)
Anton Korobeynikov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 8 13:55:44 PDT 2024
asl wrote:
> Please make sure you have a testcase for computing the difference between two blockaddresses (`void g(int*); int f() { static int x = &&A-&&B; A:g(&x);B:return x; }`). Not sure how you should handle that case.
Will you please clarify what is the problem here? `&&A-&&B` will be resolved by a linker (either static or dynamic), so there will be no way to substitute one of addresses in this expression. If this is materialized separately, as in:
```
void* tmp = &&A;
tmp -= &&B;
static int x = tmp;
```
in some constructor routine, then both `&&A` an `&&B` would be separately authenticated.
https://github.com/llvm/llvm-project/pull/97647
More information about the cfe-commits
mailing list