@@ -372,18 +372,19 @@ static void print_shadow_value(void *shadow, u64 size) {
372372 Printf (" \n " );
373373}
374374
375- #define MSAN_MAYBE_WARNING (type, size ) \
376- void __msan_maybe_warning_##size(type s, u32 o) { \
377- GET_CALLER_PC_BP; \
378- \
379- if (UNLIKELY (s)) { \
380- PrintWarningWithOrigin (pc, bp, o); \
381- print_shadow_value ((void *)(&s), sizeof (s)); \
382- if (__msan::flags ()->halt_on_error ) { \
383- Printf (" Exiting\n " ); \
384- Die (); \
385- } \
386- } \
375+ #define MSAN_MAYBE_WARNING (type, size ) \
376+ void __msan_maybe_warning_##size(type s, u32 o) { \
377+ GET_CALLER_PC_BP; \
378+ \
379+ if (UNLIKELY (s)) { \
380+ PrintWarningWithOrigin (pc, bp, o); \
381+ if (Verbosity () >= 1 ) \
382+ print_shadow_value ((void *)(&s), sizeof (s)); \
383+ if (__msan::flags ()->halt_on_error ) { \
384+ Printf (" Exiting\n " ); \
385+ Die (); \
386+ } \
387+ } \
387388 }
388389
389390MSAN_MAYBE_WARNING (u8 , 1 )
@@ -406,7 +407,8 @@ void __msan_maybe_warning_N(void *shadow, u64 size, u32 o) {
406407
407408 if (UNLIKELY (!allZero)) {
408409 PrintWarningWithOrigin (pc, bp, o);
409- print_shadow_value (shadow, size);
410+ if (Verbosity () >= 1 )
411+ print_shadow_value (shadow, size);
410412 if (__msan::flags ()->halt_on_error ) {
411413 Printf (" Exiting\n " );
412414 Die ();
0 commit comments