mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 08:30:34 +08:00
[compiler-rt] [UBSan] leave BufferedStackTrace uninit
Otherwise we have to memset 2040 bytes (255 * 8) for each call Pull Request: https://github.com/llvm/llvm-project/pull/102253
This commit is contained in:
@@ -47,7 +47,7 @@ static void MaybePrintStackTrace(uptr pc, uptr bp) {
|
||||
if (!flags()->print_stacktrace)
|
||||
return;
|
||||
|
||||
BufferedStackTrace stack;
|
||||
UNINITIALIZED BufferedStackTrace stack;
|
||||
ubsan_GetStackTrace(&stack, kStackTraceMax, pc, bp, nullptr,
|
||||
common_flags()->fast_unwind_on_fatal);
|
||||
stack.Print();
|
||||
|
||||
@@ -29,7 +29,7 @@ extern "C" {
|
||||
SANITIZER_INTERFACE_ATTRIBUTE
|
||||
void __sanitizer_print_stack_trace() {
|
||||
GET_CURRENT_PC_BP;
|
||||
BufferedStackTrace stack;
|
||||
UNINITIALIZED BufferedStackTrace stack;
|
||||
stack.Unwind(pc, bp, nullptr, common_flags()->fast_unwind_on_fatal);
|
||||
stack.Print();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user