[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 15:05:24 PDT 2025
================
@@ -352,10 +352,44 @@ void __sanitizer::BufferedStackTrace::UnwindImpl(
using namespace __msan;
+#define PRINT_FAULTING_INSTRUCTION(instname) \
+ if (__msan::flags()->print_faulting_instruction) { \
+ Printf("Instruction that failed the shadow check: %s\n", instname); \
+ Printf("\n"); \
+ }
+
+#define WARN_IF_PRINT_FAULTING_INSTRUCTION_REQUESTED \
----------------
thurstond wrote:
Good point, fixed in https://github.com/llvm/llvm-project/pull/136539/commits/56791cfa8ec7c4d739d3dd34a861a7770437180b
https://github.com/llvm/llvm-project/pull/136539
More information about the llvm-commits
mailing list