[compiler-rt] r212809 - [ASan] Print register values in a consistent way
Timur Iskhodzhanov
timurrrr at google.com
Fri Jul 11 05:14:46 PDT 2014
Author: timurrrr
Date: Fri Jul 11 07:14:46 2014
New Revision: 212809
URL: http://llvm.org/viewvc/llvm-project?rev=212809&view=rev
Log:
[ASan] Print register values in a consistent way
Modified:
compiler-rt/trunk/lib/asan/asan_report.cc
compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc
Modified: compiler-rt/trunk/lib/asan/asan_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_report.cc?rev=212809&r1=212808&r2=212809&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_report.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_report.cc Fri Jul 11 07:14:46 2014
@@ -602,8 +602,8 @@ void ReportStackOverflow(uptr pc, uptr s
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 *descripti
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 b
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());
Modified: compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc?rev=212809&r1=212808&r2=212809&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc Fri Jul 11 07:14:46 2014
@@ -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.
More information about the llvm-commits
mailing list