[compiler-rt] r182477 - [asan] fix the reported PCs for powerpc64
Kostya Serebryany
kcc at google.com
Wed May 22 07:21:34 PDT 2013
Author: kcc
Date: Wed May 22 09:21:34 2013
New Revision: 182477
URL: http://llvm.org/viewvc/llvm-project?rev=182477&view=rev
Log:
[asan] fix the reported PCs for powerpc64
Modified:
compiler-rt/trunk/lib/asan/asan_report.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=182477&r1=182476&r2=182477&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_report.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_report.cc Wed May 22 09:21:34 2013
@@ -273,6 +273,14 @@ bool DescribeAddressIfStack(uptr addr, u
uptr frame_pc = 0;
char tname[128];
const char *frame_descr = t->GetFrameNameByAddr(addr, &offset, &frame_pc);
+
+#ifdef __powerpc64__
+ // On PowerPC64, the address of a function actually points to a
+ // three-doubleword data structure with the first field containing
+ // the address of the function's code.
+ frame_pc = *reinterpret_cast<uptr *>(frame_pc);
+#endif
+
// This string is created by the compiler and has the following form:
// "n alloc_1 alloc_2 ... alloc_n"
// where alloc_i looks like "offset size len ObjectName ".
More information about the llvm-commits
mailing list