]> git.ipfire.org Git - thirdparty/gcc.git/blame - libsanitizer/ubsan/ubsan_checks.inc
Do not handle VLA in sanitization (PR sanitizer/81460).
[thirdparty/gcc.git] / libsanitizer / ubsan / ubsan_checks.inc
CommitLineData
5645a48f 1//===-- ubsan_checks.inc ----------------------------------------*- C++ -*-===//
2//
3// This file is distributed under the University of Illinois Open Source
4// License. See LICENSE.TXT for details.
5//
6//===----------------------------------------------------------------------===//
7//
8// List of checks handled by UBSan runtime.
9//
10//===----------------------------------------------------------------------===//
11#ifndef UBSAN_CHECK
12# error "Define UBSAN_CHECK prior to including this file!"
13#endif
14
23e39437 15// UBSAN_CHECK(Name, SummaryKind, FSanitizeFlagName)
16// SummaryKind and FSanitizeFlagName should be string literals.
5645a48f 17
23e39437 18UBSAN_CHECK(GenericUB, "undefined-behavior", "undefined")
19UBSAN_CHECK(NullPointerUse, "null-pointer-use", "null")
20UBSAN_CHECK(MisalignedPointerUse, "misaligned-pointer-use", "alignment")
21UBSAN_CHECK(InsufficientObjectSize, "insufficient-object-size", "object-size")
5645a48f 22UBSAN_CHECK(SignedIntegerOverflow, "signed-integer-overflow",
23e39437 23 "signed-integer-overflow")
5645a48f 24UBSAN_CHECK(UnsignedIntegerOverflow, "unsigned-integer-overflow",
23e39437 25 "unsigned-integer-overflow")
5645a48f 26UBSAN_CHECK(IntegerDivideByZero, "integer-divide-by-zero",
23e39437 27 "integer-divide-by-zero")
28UBSAN_CHECK(FloatDivideByZero, "float-divide-by-zero", "float-divide-by-zero")
29UBSAN_CHECK(InvalidShiftBase, "invalid-shift-base", "shift-base")
30UBSAN_CHECK(InvalidShiftExponent, "invalid-shift-exponent", "shift-exponent")
31UBSAN_CHECK(OutOfBoundsIndex, "out-of-bounds-index", "bounds")
32UBSAN_CHECK(UnreachableCall, "unreachable-call", "unreachable")
33UBSAN_CHECK(MissingReturn, "missing-return", "return")
34UBSAN_CHECK(NonPositiveVLAIndex, "non-positive-vla-index", "vla-bound")
35UBSAN_CHECK(FloatCastOverflow, "float-cast-overflow", "float-cast-overflow")
36UBSAN_CHECK(InvalidBoolLoad, "invalid-bool-load", "bool")
37UBSAN_CHECK(InvalidEnumLoad, "invalid-enum-load", "enum")
38UBSAN_CHECK(FunctionTypeMismatch, "function-type-mismatch", "function")
5645a48f 39UBSAN_CHECK(InvalidNullReturn, "invalid-null-return",
23e39437 40 "returns-nonnull-attribute")
41UBSAN_CHECK(InvalidNullArgument, "invalid-null-argument", "nonnull-attribute")
42UBSAN_CHECK(DynamicTypeMismatch, "dynamic-type-mismatch", "vptr")
43UBSAN_CHECK(CFIBadType, "cfi-bad-type", "cfi")