summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2014-07-11 12:14:46 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2014-07-11 12:14:46 +0000
commit734176b59fe6c2ed8507e990b3c4b2a893403913 (patch)
treee04452d50e3af077f49797384656dcbd7bef475e
parent65b42e13c28dfc17859db3ba78dc0a4e2a35cb9c (diff)
downloadcompiler-rt-734176b59fe6c2ed8507e990b3c4b2a893403913.tar.gz
[ASan] Print register values in a consistent way
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212809 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/asan/asan_report.cc10
-rw-r--r--test/asan/TestCases/stack-overflow.cc2
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/asan/asan_report.cc b/lib/asan/asan_report.cc
index fb7c8fd09..cee0db574 100644
--- a/lib/asan/asan_report.cc
+++ b/lib/asan/asan_report.cc
@@ -602,8 +602,8 @@ void ReportStackOverflow(uptr pc, uptr sp, uptr bp, void *context, uptr addr) {
Printf("%s", d.Warning());
Report(
"ERROR: AddressSanitizer: stack-overflow on address %p"
- " (pc %p sp %p bp %p T%d)\n",
- (void *)addr, (void *)pc, (void *)sp, (void *)bp,
+ " (pc %p bp %p sp %p T%d)\n",
+ (void *)addr, (void *)pc, (void *)bp, (void *)sp,
GetCurrentTidOrInvalid());
Printf("%s", d.EndWarning());
GET_STACK_TRACE_SIGNAL(pc, bp, context);
@@ -618,8 +618,8 @@ void ReportSIGSEGV(const char *description, uptr pc, uptr sp, uptr bp,
Printf("%s", d.Warning());
Report(
"ERROR: AddressSanitizer: %s on unknown address %p"
- " (pc %p sp %p bp %p T%d)\n",
- description, (void *)addr, (void *)pc, (void *)sp, (void *)bp,
+ " (pc %p bp %p sp %p T%d)\n",
+ description, (void *)addr, (void *)pc, (void *)bp, (void *)sp,
GetCurrentTidOrInvalid());
Printf("%s", d.EndWarning());
GET_STACK_TRACE_SIGNAL(pc, bp, context);
@@ -906,7 +906,7 @@ void __asan_report_error(uptr pc, uptr bp, uptr sp, uptr addr, int is_write,
Decorator d;
Printf("%s", d.Warning());
Report("ERROR: AddressSanitizer: %s on address "
- "%p at pc 0x%zx bp 0x%zx sp 0x%zx\n",
+ "%p at pc %p bp %p sp %p\n",
bug_descr, (void*)addr, pc, bp, sp);
Printf("%s", d.EndWarning());
diff --git a/test/asan/TestCases/stack-overflow.cc b/test/asan/TestCases/stack-overflow.cc
index 234e3c728..9d7c72c9c 100644
--- a/test/asan/TestCases/stack-overflow.cc
+++ b/test/asan/TestCases/stack-overflow.cc
@@ -74,7 +74,7 @@ void recursive_func(char *p) {
if (y)
recursive_func(buf);
x = 1; // prevent tail call optimization
- // CHECK: {{stack-overflow on address 0x.* \(pc 0x.* sp 0x.* bp 0x.* T.*\)}}
+ // CHECK: {{stack-overflow on address 0x.* \(pc 0x.* bp 0x.* sp 0x.* T.*\)}}
// If stack overflow happens during function prologue, stack trace may be
// corrupted. Unwind tables are not always 100% exact there.
// For this reason, we don't do any further checks.