[PATCH] D31977: Use 0-padding for i386 and arm print format specifiers

Francis Ricci via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 07:28:10 PDT 2017


fjricci created this revision.
Herald added subscribers: kubamracek, rengolin, aemerson.

This is used for the other architectures in print_address, but is
missing from i386 and arm.


https://reviews.llvm.org/D31977

Files:
  test/sanitizer_common/print_address.h


Index: test/sanitizer_common/print_address.h
===================================================================
--- test/sanitizer_common/print_address.h
+++ test/sanitizer_common/print_address.h
@@ -12,7 +12,7 @@
     // match to the format used in the diagnotic message.
     fprintf(stderr, "0x%012lx ", (unsigned long) p);
 #elif defined(__i386__) || defined(__arm__)
-    fprintf(stderr, "0x%8lx ", (unsigned long) p);
+    fprintf(stderr, "0x%08lx ", (unsigned long) p);
 #elif defined(__mips64)
     fprintf(stderr, "0x%010lx ", (unsigned long) p);
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31977.94965.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170412/65217f55/attachment.bin>


More information about the llvm-commits mailing list