1018981977
libsanitizer/ * All source files: Merge from upstream 285547. * configure.tgt (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): New variable. * configure.ac (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Handle it. * asan/Makefile.am (asan_files): Add new files. * asan/Makefile.in: Regenerate. * ubsan/Makefile.in: Likewise. * lsan/Makefile.in: Likewise. * tsan/Makefile.am (tsan_files): Add new files. * tsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.am (sanitizer_common_files): Add new files. (EXTRA_libsanitizer_common_la_SOURCES): Define. (libsanitizer_common_la_LIBADD): Likewise. (libsanitizer_common_la_DEPENDENCIES): Likewise. * sanitizer_common/Makefile.in: Regenerate. * interception/Makefile.in: Likewise. * libbacktace/Makefile.in: Likewise. * Makefile.in: Likewise. * configure: Likewise. * merge.sh: Handle builtins/assembly.h merging. * builtins/assembly.h: New file. * asan/libtool-version: Bump the libasan SONAME. From-SVN: r241977
44 lines
2.2 KiB
C++
44 lines
2.2 KiB
C++
//===-- ubsan_checks.inc ----------------------------------------*- C++ -*-===//
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// List of checks handled by UBSan runtime.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
#ifndef UBSAN_CHECK
|
|
# error "Define UBSAN_CHECK prior to including this file!"
|
|
#endif
|
|
|
|
// UBSAN_CHECK(Name, SummaryKind, FSanitizeFlagName)
|
|
// SummaryKind and FSanitizeFlagName should be string literals.
|
|
|
|
UBSAN_CHECK(GenericUB, "undefined-behavior", "undefined")
|
|
UBSAN_CHECK(NullPointerUse, "null-pointer-use", "null")
|
|
UBSAN_CHECK(MisalignedPointerUse, "misaligned-pointer-use", "alignment")
|
|
UBSAN_CHECK(InsufficientObjectSize, "insufficient-object-size", "object-size")
|
|
UBSAN_CHECK(SignedIntegerOverflow, "signed-integer-overflow",
|
|
"signed-integer-overflow")
|
|
UBSAN_CHECK(UnsignedIntegerOverflow, "unsigned-integer-overflow",
|
|
"unsigned-integer-overflow")
|
|
UBSAN_CHECK(IntegerDivideByZero, "integer-divide-by-zero",
|
|
"integer-divide-by-zero")
|
|
UBSAN_CHECK(FloatDivideByZero, "float-divide-by-zero", "float-divide-by-zero")
|
|
UBSAN_CHECK(InvalidShiftBase, "invalid-shift-base", "shift-base")
|
|
UBSAN_CHECK(InvalidShiftExponent, "invalid-shift-exponent", "shift-exponent")
|
|
UBSAN_CHECK(OutOfBoundsIndex, "out-of-bounds-index", "bounds")
|
|
UBSAN_CHECK(UnreachableCall, "unreachable-call", "unreachable")
|
|
UBSAN_CHECK(MissingReturn, "missing-return", "return")
|
|
UBSAN_CHECK(NonPositiveVLAIndex, "non-positive-vla-index", "vla-bound")
|
|
UBSAN_CHECK(FloatCastOverflow, "float-cast-overflow", "float-cast-overflow")
|
|
UBSAN_CHECK(InvalidBoolLoad, "invalid-bool-load", "bool")
|
|
UBSAN_CHECK(InvalidEnumLoad, "invalid-enum-load", "enum")
|
|
UBSAN_CHECK(FunctionTypeMismatch, "function-type-mismatch", "function")
|
|
UBSAN_CHECK(InvalidNullReturn, "invalid-null-return",
|
|
"returns-nonnull-attribute")
|
|
UBSAN_CHECK(InvalidNullArgument, "invalid-null-argument", "nonnull-attribute")
|
|
UBSAN_CHECK(DynamicTypeMismatch, "dynamic-type-mismatch", "vptr")
|
|
UBSAN_CHECK(CFIBadType, "cfi-bad-type", "cfi")
|