Skip to content

Commit 338bccd

Browse files
committed
Move before PrintWarningWithOrigin
1 parent a856b74 commit 338bccd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler-rt/lib/msan/msan.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ using namespace __msan;
355355
// N.B. Only [shadow, shadow+size) is defined. shadow is *not* a pointer into
356356
// an MSan shadow region.
357357
static void print_shadow_value(void *shadow, u64 size) {
358-
Printf("\n");
359358
Printf("Shadow value (%llu byte%s):", size, size == 1 ? "" : "s");
360359
for (unsigned int i = 0; i < size; i++) {
361360
if (i % 4 == 0)
@@ -377,9 +376,9 @@ static void print_shadow_value(void *shadow, u64 size) {
377376
GET_CALLER_PC_BP; \
378377
\
379378
if (UNLIKELY(s)) { \
380-
PrintWarningWithOrigin(pc, bp, o); \
381379
if (Verbosity() >= 1) \
382380
print_shadow_value((void *)(&s), sizeof(s)); \
381+
PrintWarningWithOrigin(pc, bp, o); \
383382
if (__msan::flags()->halt_on_error) { \
384383
Printf("Exiting\n"); \
385384
Die(); \
@@ -406,9 +405,9 @@ void __msan_maybe_warning_N(void *shadow, u64 size, u32 o) {
406405
}
407406

408407
if (UNLIKELY(!allZero)) {
409-
PrintWarningWithOrigin(pc, bp, o);
410408
if (Verbosity() >= 1)
411409
print_shadow_value(shadow, size);
410+
PrintWarningWithOrigin(pc, bp, o);
412411
if (__msan::flags()->halt_on_error) {
413412
Printf("Exiting\n");
414413
Die();

0 commit comments

Comments
 (0)