mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 18:26:33 +00:00

Adding support for the extra SUMMARY line that is output by most compilers. This also adds the ability for end-users to specify their own handlers for reporting these errors (see the test).
36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
//===--- rtsan_diagnostics.h - Realtime Sanitizer ---------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the RealtimeSanitizer runtime library
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#pragma once
|
|
|
|
#include "sanitizer_common/sanitizer_common.h"
|
|
#include "sanitizer_common/sanitizer_internal_defs.h"
|
|
|
|
namespace __rtsan {
|
|
|
|
enum class DiagnosticsInfoType {
|
|
InterceptedCall,
|
|
BlockingCall,
|
|
};
|
|
|
|
struct DiagnosticsInfo {
|
|
DiagnosticsInfoType type;
|
|
const char *func_name;
|
|
__sanitizer::uptr pc;
|
|
__sanitizer::uptr bp;
|
|
};
|
|
|
|
void PrintDiagnostics(const DiagnosticsInfo &info);
|
|
void PrintErrorSummary(const DiagnosticsInfo &info,
|
|
const __sanitizer::BufferedStackTrace &stack);
|
|
} // namespace __rtsan
|