summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/asan/asan_stack.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/asan/asan_stack.cc b/lib/asan/asan_stack.cc
index 8b432e48c..1099f32fa 100644
--- a/lib/asan/asan_stack.cc
+++ b/lib/asan/asan_stack.cc
@@ -48,9 +48,7 @@ static uptr patch_pc(uptr pc) {
#if defined(ASAN_USE_EXTERNAL_SYMBOLIZER)
void AsanStackTrace::PrintStack(uptr *addr, uptr size) {
for (uptr i = 0; i < size && addr[i]; i++) {
- uptr pc = addr[i];
- if (i < size - 1 && addr[i + 1])
- pc = patch_pc(pc);
+ uptr pc = patch_pc(addr[i]);
char buff[4096];
ASAN_USE_EXTERNAL_SYMBOLIZER((void*)pc, buff, sizeof(buff));
// We can't know anything about the string returned by external
@@ -65,9 +63,7 @@ void AsanStackTrace::PrintStack(uptr *addr, uptr size) {
ProcessMaps proc_maps;
uptr frame_num = 0;
for (uptr i = 0; i < size && addr[i]; i++) {
- uptr pc = addr[i];
- if (i < size - 1 && addr[i + 1])
- pc = patch_pc(pc);
+ uptr pc = patch_pc(addr[i]);
AddressInfo addr_frames[64];
uptr addr_frames_num = 0;
if (flags()->symbolize) {