[PATCH] [asan] Print SHADOW_SCALE and SHADOW_GRANULARITY as decimal values.
Timur Iskhodzhanov
timurrrr at google.com
Thu Apr 23 07:57:20 PDT 2015
I'd like Kostya to comment first.
================
Comment at: lib/asan/asan_rtl.cc:350
@@ -349,4 +349,3 @@
- Printf("SHADOW_SCALE: %zx\n", (uptr)SHADOW_SCALE);
- Printf("SHADOW_GRANULARITY: %zx\n", (uptr)SHADOW_GRANULARITY);
- Printf("SHADOW_OFFSET: %zx\n", (uptr)SHADOW_OFFSET);
+ Printf("SHADOW_SCALE: %d\n", (uptr)SHADOW_SCALE);
+ Printf("SHADOW_GRANULARITY: %d\n", (uptr)SHADOW_GRANULARITY);
----------------
please cast to `int`
================
Comment at: test/asan/TestCases/debug_mapping.cc:15
@@ -14,3 +14,3 @@
size_t scale, offset;
__asan_get_shadow_mapping(&scale, &offset);
----------------
I wonder if the interface function's first parameter type should be changed to `int*`.
================
Comment at: test/asan/TestCases/debug_mapping.cc:17
@@ -16,3 +16,3 @@
- fprintf(stderr, "scale: %lx\n", scale);
- fprintf(stderr, "offset: %lx\n", offset);
+ fprintf(stderr, "scale: %d\n", scale);
+ fprintf(stderr, "offset: 0x%lx\n", offset);
----------------
ditto
http://reviews.llvm.org/D9224
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list