[compiler-rt] [llvm] [msan] Add experimental '-mllvm -msan-embed-faulting-instruction' and MSAN_OPTIONS=print_faulting_instruction (PR #136539)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 22 16:10:49 PDT 2025


thurstond wrote:

> Why DEBUG_COUNTER DebugInsertCheck and DebugInstrumentInstruction are not enough?

- Compared to `MSAN_OPTIONS=print_faulting_instruction=...`: DebugInsertCheck and DebugInstrumentInstruction requires trial and error (bisection?) to find the debug counter value that would isolate the failing instruction. Doing the bisection - which requires recompiling and then rerunning the binary - is a lot of manual effort and a waste of compute resources.
- Compared to the proposed but not implemented `MSAN_OPTIONS=ignore_faulting_instruction=...`: DebugInsertCheck and DebugInstrumentInstruction are configured at compile-time, while ignore_faulting_instruction is compile one-time with instrumentation and then configure at runtime which instructions to skip.

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


More information about the llvm-commits mailing list