Path: blob/main/contrib/llvm-project/compiler-rt/lib/ubsan/ubsan_handlers_cxx.h
35233 views
//===-- ubsan_handlers_cxx.h ------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// Entry points to the runtime library for Clang's undefined behavior sanitizer,9// for C++-specific checks. This code is not linked into C binaries.10//11//===----------------------------------------------------------------------===//12#ifndef UBSAN_HANDLERS_CXX_H13#define UBSAN_HANDLERS_CXX_H1415#include "ubsan_value.h"1617namespace __ubsan {1819struct DynamicTypeCacheMissData {20SourceLocation Loc;21const TypeDescriptor &Type;22void *TypeInfo;23unsigned char TypeCheckKind;24};2526/// \brief Handle a runtime type check failure, caused by an incorrect vptr.27/// When this handler is called, all we know is that the type was not in the28/// cache; this does not necessarily imply the existence of a bug.29extern "C" SANITIZER_INTERFACE_ATTRIBUTE30void __ubsan_handle_dynamic_type_cache_miss(31DynamicTypeCacheMissData *Data, ValueHandle Pointer, ValueHandle Hash);32extern "C" SANITIZER_INTERFACE_ATTRIBUTE33void __ubsan_handle_dynamic_type_cache_miss_abort(34DynamicTypeCacheMissData *Data, ValueHandle Pointer, ValueHandle Hash);35}3637#endif // UBSAN_HANDLERS_CXX_H383940