1 //===-- ubsan_diag_standalone.cc ------------------------------------------===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // Diagnostic reporting for the standalone UBSan runtime.
10 //===----------------------------------------------------------------------===//
12 #include "ubsan_platform.h"
14 #include "ubsan_diag.h"
16 using namespace __ubsan
;
19 SANITIZER_INTERFACE_ATTRIBUTE
20 void __sanitizer_print_stack_trace() {
23 bool request_fast_unwind
= common_flags()->fast_unwind_on_fatal
;
24 if (request_fast_unwind
)
25 __sanitizer::GetThreadStackTopAndBottom(false, &top
, &bottom
);
29 BufferedStackTrace stack
;
30 stack
.Unwind(kStackTraceMax
, pc
, bp
, nullptr, top
, bottom
,
36 #endif // CAN_SANITIZE_UB