Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 3a3c8c7

Browse files
author
Jessica Paquette
committed
Revert "[sanitizer] Include inlined frames into __sanitizer_symbolize_pc output"
This reverts r343554. It was breaking some bots: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA/49997/ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@343600 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 5da4968 commit 3a3c8c7

File tree

3 files changed

+5
-55
lines changed

3 files changed

+5
-55
lines changed

include/sanitizer/common_interface_defs.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,6 @@ extern "C" {
124124

125125
// Symbolizes the supplied 'pc' using the format string 'fmt'.
126126
// Outputs at most 'out_buf_size' bytes into 'out_buf'.
127-
// If 'out_buf' is not empty then output is zero or more non empty C strings
128-
// followed by single empty C string. Multiple strings can be returned if PC
129-
// corresponds to inlined function. Inlined frames are printed in the order
130-
// from "most-inlined" to the "least-inlined", so the last frame should be the
131-
// not inlined function.
132-
// Inlined frames can be removed with 'symbolize_inline_frames=0'.
133127
// The format syntax is described in
134128
// lib/sanitizer_common/sanitizer_stacktrace_printer.h.
135129
void __sanitizer_symbolize_pc(void *pc, const char *fmt, char *out_buf,

lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -114,25 +114,11 @@ void __sanitizer_symbolize_pc(uptr pc, const char *fmt, char *out_buf,
114114
return;
115115
}
116116
InternalScopedString frame_desc(GetPageSizeCached());
117-
uptr frame_num = 0;
118-
// Reserve one byte for the final 0.
119-
char *out_end = out_buf + out_buf_size - 1;
120-
for (SymbolizedStack *cur = frame; cur && out_buf < out_end;
121-
cur = cur->next) {
122-
frame_desc.clear();
123-
RenderFrame(&frame_desc, fmt, frame_num++, cur->info,
124-
common_flags()->symbolize_vs_style,
125-
common_flags()->strip_path_prefix);
126-
if (!frame_desc.length())
127-
continue;
128-
// Reserve one byte for the terminating 0.
129-
uptr n = out_end - out_buf - 1;
130-
internal_strncpy(out_buf, frame_desc.data(), n);
131-
out_buf += __sanitizer::Min<uptr>(n, frame_desc.length());
132-
*out_buf++ = 0;
133-
}
134-
CHECK(out_buf <= out_end);
135-
*out_buf = 0;
117+
RenderFrame(&frame_desc, fmt, 0, frame->info,
118+
common_flags()->symbolize_vs_style,
119+
common_flags()->strip_path_prefix);
120+
internal_strncpy(out_buf, frame_desc.data(), out_buf_size);
121+
out_buf[out_buf_size - 1] = 0;
136122
}
137123

138124
SANITIZER_INTERFACE_ATTRIBUTE

test/sanitizer_common/TestCases/symbolize_pc_inline.cc

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)