[compiler-rt] [rtsan][test] Prevent test check from being optimized out in LTO builds (PR #122524)

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 13:16:53 PST 2025


ilovepi wrote:

@cjappl I guess there's a question here about what's being sanitized: the source program vs the optimized binary. So of the goal of RTsan is to find source level issues, then perhaps it should prevent inlining or other types of optimizations on instrumented functions. If we only care about what makes it into the binary, then the current approach is probably fine, but these and other tests may need to use tricks like this more liberally. We should also probably consider adding a buildbot config that tests LTO'd runtimes. Once the libunwind CMake patches land.

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


More information about the llvm-commits mailing list