1 //===-- ubsan_diag_standalone.cc ------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Diagnostic reporting for the standalone UBSan runtime.
12 //===----------------------------------------------------------------------===//
14 #include "ubsan_platform.h"
16 #include "ubsan_diag.h"
18 using namespace __ubsan;
21 SANITIZER_INTERFACE_ATTRIBUTE
22 void __sanitizer_print_stack_trace() {
25 bool request_fast_unwind = common_flags()->fast_unwind_on_fatal;
26 if (request_fast_unwind)
27 __sanitizer::GetThreadStackTopAndBottom(false, &top, &bottom);
31 BufferedStackTrace stack;
32 stack.Unwind(kStackTraceMax, pc, bp, nullptr, top, bottom,
38 #endif // CAN_SANITIZE_UB