[llvm] [hwasan] Add hwasan-all-globals option (PR #149621)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 18 17:54:20 PDT 2025


shuffle2 wrote:

The intent of this change is to allow hwasan globals instrumentation to be effective on embedded targets which tend to extensively use custom sections to have fine grained control of data allocation, and mainly/exclusively use global storage instead of dynamically allocated memory. 

I don't think listing all sections you want to instrument would be a good solution. A normal user would then need to duplicate all expected section names in some build scripts. Also, some large codebases which this is intended for auto-create section names in ways which would be annoying to manually upkeep in related build scripts (e.g. generated based on `__FILE__` and/or `__LINE__`).

https://github.com/llvm/llvm-project/pull/149621


More information about the llvm-commits mailing list