Skip to content

Commit aacd1af

Browse files
committed
[compiler-rt] [UBSan] leave BufferedStackTrace uninit
Otherwise we have to memset 2040 bytes (255 * 8) for each call Pull Request: #102253
1 parent 4cad17d commit aacd1af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler-rt/lib/ubsan/ubsan_diag.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static void MaybePrintStackTrace(uptr pc, uptr bp) {
4747
if (!flags()->print_stacktrace)
4848
return;
4949

50-
BufferedStackTrace stack;
50+
UNINITIALIZED BufferedStackTrace stack;
5151
ubsan_GetStackTrace(&stack, kStackTraceMax, pc, bp, nullptr,
5252
common_flags()->fast_unwind_on_fatal);
5353
stack.Print();

compiler-rt/lib/ubsan/ubsan_diag_standalone.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern "C" {
2929
SANITIZER_INTERFACE_ATTRIBUTE
3030
void __sanitizer_print_stack_trace() {
3131
GET_CURRENT_PC_BP;
32-
BufferedStackTrace stack;
32+
UNINITIALIZED BufferedStackTrace stack;
3333
stack.Unwind(pc, bp, nullptr, common_flags()->fast_unwind_on_fatal);
3434
stack.Print();
3535
}

0 commit comments

Comments
 (0)