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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to