[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 26 15:17:54 PDT 2024


MaskRay wrote:

> @MaskRay can you talk more about your concerns? This won't affect compile time, and instrumenting a shadow load will cause an immediate crash of the application at runtime. This patch seems much more robust than counting on toolchains to always arrange to avoid double instrumentation.

>From Eli:  I'm a little skeptical that you pass pipeline is really doing what you want if you end up running sanitizer passes twice; that indicates you're running a bunch of other optimization passes twice without a good reason.

The other passes will affect compile time. There are many more instrumentation passes than sanitizers. I am concerned this leads us to the rabbit hole to add others (or others would blindly copy the pattern here, when the use cases aren't recommended/endorsed for other platforms).

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


More information about the cfe-commits mailing list