[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:
Florian Mayer
2024-08-06 16:48:54 -07:00
parent 4cad17de79
commit aacd1afa1e
2 changed files with 2 additions and 2 deletions

View File

@@ -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();

View File

@@ -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();
}