syscall: workaround for getsockname bug in AIX
[official-gcc.git] / libsanitizer / ubsan / ubsan_checks.inc
blob31e9495e3012e9fd2499ba2540215bd6a87e44c9
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
15 // UBSAN_CHECK(Name, SummaryKind, FSanitizeFlagName)
16 // SummaryKind and FSanitizeFlagName should be string literals.
18 UBSAN_CHECK(GenericUB, "undefined-behavior", "undefined")
19 UBSAN_CHECK(NullPointerUse, "null-pointer-use", "null")
20 UBSAN_CHECK(PointerOverflow, "pointer-overflow", "pointer-overflow")
21 UBSAN_CHECK(MisalignedPointerUse, "misaligned-pointer-use", "alignment")
22 UBSAN_CHECK(InsufficientObjectSize, "insufficient-object-size", "object-size")
23 UBSAN_CHECK(SignedIntegerOverflow, "signed-integer-overflow",
24             "signed-integer-overflow")
25 UBSAN_CHECK(UnsignedIntegerOverflow, "unsigned-integer-overflow",
26             "unsigned-integer-overflow")
27 UBSAN_CHECK(IntegerDivideByZero, "integer-divide-by-zero",
28             "integer-divide-by-zero")
29 UBSAN_CHECK(FloatDivideByZero, "float-divide-by-zero", "float-divide-by-zero")
30 UBSAN_CHECK(InvalidShiftBase, "invalid-shift-base", "shift-base")
31 UBSAN_CHECK(InvalidShiftExponent, "invalid-shift-exponent", "shift-exponent")
32 UBSAN_CHECK(OutOfBoundsIndex, "out-of-bounds-index", "bounds")
33 UBSAN_CHECK(UnreachableCall, "unreachable-call", "unreachable")
34 UBSAN_CHECK(MissingReturn, "missing-return", "return")
35 UBSAN_CHECK(NonPositiveVLAIndex, "non-positive-vla-index", "vla-bound")
36 UBSAN_CHECK(FloatCastOverflow, "float-cast-overflow", "float-cast-overflow")
37 UBSAN_CHECK(InvalidBoolLoad, "invalid-bool-load", "bool")
38 UBSAN_CHECK(InvalidEnumLoad, "invalid-enum-load", "enum")
39 UBSAN_CHECK(FunctionTypeMismatch, "function-type-mismatch", "function")
40 UBSAN_CHECK(InvalidNullReturn, "invalid-null-return",
41             "returns-nonnull-attribute")
42 UBSAN_CHECK(InvalidNullArgument, "invalid-null-argument", "nonnull-attribute")
43 UBSAN_CHECK(DynamicTypeMismatch, "dynamic-type-mismatch", "vptr")
44 UBSAN_CHECK(CFIBadType, "cfi-bad-type", "cfi")