#include "ubsan_platform.h"
#if CAN_SANITIZE_UB
#include "ubsan_diag.h"
#include "ubsan_init.h"
#include "ubsan_flags.h"
#include "ubsan_monitor.h"
#include "sanitizer_common/sanitizer_placement_new.h"
#include "sanitizer_common/sanitizer_report_decorator.h"
#include "sanitizer_common/sanitizer_stacktrace.h"
#include "sanitizer_common/sanitizer_stacktrace_printer.h"
#include "sanitizer_common/sanitizer_suppressions.h"
#include "sanitizer_common/sanitizer_symbolizer.h"
#include <stdio.h>
usingnamespace__ubsan;
void ubsan_GetStackTrace(BufferedStackTrace *stack, uptr max_depth, uptr pc,
uptr bp, void *context, bool request_fast) { … }
static void MaybePrintStackTrace(uptr pc, uptr bp) { … }
static const char *ConvertTypeToString(ErrorType Type) { … }
static const char *ConvertTypeToFlagName(ErrorType Type) { … }
static void MaybeReportErrorSummary(Location Loc, ErrorType Type) { … }
namespace {
class Decorator : public SanitizerCommonDecorator { … };
}
SymbolizedStack *__ubsan::getSymbolizedLocation(uptr PC) { … }
Diag &Diag::operator<<(const TypeDescriptor &V) { … }
Diag &Diag::operator<<(const Value &V) { … }
static void RenderHex(InternalScopedString *Buffer, UIntMax Val) { … }
static void RenderLocation(InternalScopedString *Buffer, Location Loc) { … }
static void RenderText(InternalScopedString *Buffer, const char *Message,
const Diag::Arg *Args) { … }
static Range *upperBound(MemoryLocation Loc, Range *Ranges,
unsigned NumRanges) { … }
static inline uptr subtractNoOverflow(uptr LHS, uptr RHS) { … }
static inline uptr addNoOverflow(uptr LHS, uptr RHS) { … }
static void PrintMemorySnippet(const Decorator &Decor, MemoryLocation Loc,
Range *Ranges, unsigned NumRanges,
const Diag::Arg *Args) { … }
Diag::~Diag() { … }
ScopedReport::Initializer::Initializer() { … }
ScopedReport::ScopedReport(ReportOptions Opts, Location SummaryLoc,
ErrorType Type)
: … { … }
ScopedReport::~ScopedReport() { … }
alignas(64) static char suppression_placeholder[sizeof(SuppressionContext)];
static SuppressionContext *suppression_ctx = …;
static const char kVptrCheck[] = …;
static const char *kSuppressionTypes[] = …;
void __ubsan::InitializeSuppressions() { … }
bool __ubsan::IsVptrCheckSuppressed(const char *TypeName) { … }
bool __ubsan::IsPCSuppressed(ErrorType ET, uptr PC, const char *Filename) { … }
#endif