[compiler-rt] [llvm] [asan] Limit priority of ctor to kMax-1 (PR #101772)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 17:30:57 PDT 2024
MaskRay wrote:
> > asan changing the priority of a llvm.global_ctors element might be surprising. Is this change to work with some specific code or specific IR code generators that use 65535 (instrumentation cannot do anything with `.init_array.65535` in inline assembly)? Can we change these tools instead?
>
> No. The goal to be able to call `asan` runtime callback just after the last dynamic constructor.
Is there more information about this decision? What would break if the order is different?
So priority 65535 is unsuffixed `.init_array`. Lots of code might use inline asm `.section .init_array,"aw", at init_array`.
Instrumentation cannot safely do anything with them (e.g. adding `.65534` suffix).
https://github.com/llvm/llvm-project/pull/101772
More information about the llvm-commits
mailing list