summaryrefslogtreecommitdiff
path: root/lib/msan/msan_report.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msan/msan_report.cc')
-rw-r--r--lib/msan/msan_report.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/msan/msan_report.cc b/lib/msan/msan_report.cc
index 8a3fd04cb..566034c66 100644
--- a/lib/msan/msan_report.cc
+++ b/lib/msan/msan_report.cc
@@ -221,7 +221,11 @@ void DescribeMemoryRange(const void *x, uptr size) {
} else {
unsigned char v = *(unsigned char *)s;
if (v) last_quad_poisoned = true;
- Printf("%02x", v);
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ Printf("%x%x", v & 0xf, v >> 4);
+#else
+ Printf("%x%x", v >> 4, v & 0xf);
+#endif
}
// Group end.
if (pos % 4 == 3 && with_origins) {