Fix native windows build by adding signal.h back into the include list.
[official-gcc.git] / libsanitizer / ubsan / ubsan_checks.inc
blob935d82c5079218937ddcdc6957962e2e49430aa4
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, FlagName)
16 // SummaryKind and FlagName should be string literals.
18 UBSAN_CHECK(GenericUB, "undefined-behavior", "-fsanitize=undefined")
19 UBSAN_CHECK(NullPointerUse, "null-pointer-use", "-fsanitize=null")
20 UBSAN_CHECK(MisalignedPointerUse, "misaligned-pointer-use",
21             "-fsanitize=alignment")
22 UBSAN_CHECK(InsufficientObjectSize, "insufficient-object-size",
23             "-fsanitize=object-size")
24 UBSAN_CHECK(SignedIntegerOverflow, "signed-integer-overflow",
25             "-fsanitize=signed-integer-overflow")
26 UBSAN_CHECK(UnsignedIntegerOverflow, "unsigned-integer-overflow",
27             "-fsanitize=unsigned-integer-overflow")
28 UBSAN_CHECK(IntegerDivideByZero, "integer-divide-by-zero",
29             "-fsanitize=integer-divide-by-zero")
30 UBSAN_CHECK(FloatDivideByZero, "float-divide-by-zero",
31             "-fsanitize=float-divide-by-zero")
32 UBSAN_CHECK(InvalidShiftBase, "invalid-shift-base", "-fsanitize=shift-base")
33 UBSAN_CHECK(InvalidShiftExponent, "invalid-shift-exponent",
34             "-fsanitize=shift-exponent")
35 UBSAN_CHECK(OutOfBoundsIndex, "out-of-bounds-index", "-fsanitize=bounds")
36 UBSAN_CHECK(UnreachableCall, "unreachable-call", "-fsanitize=unreachable")
37 UBSAN_CHECK(MissingReturn, "missing-return", "-fsanitize=return")
38 UBSAN_CHECK(NonPositiveVLAIndex, "non-positive-vla-index",
39             "-fsanitize=vla-bound")
40 UBSAN_CHECK(FloatCastOverflow, "float-cast-overflow",
41             "-fsanitize=float-cast-overflow")
42 UBSAN_CHECK(InvalidBoolLoad, "invalid-bool-load", "-fsanitize=bool")
43 UBSAN_CHECK(InvalidEnumLoad, "invalid-enum-load", "-fsanitize=enum")
44 UBSAN_CHECK(FunctionTypeMismatch, "function-type-mismatch",
45             "-fsanitize=function")
46 UBSAN_CHECK(InvalidNullReturn, "invalid-null-return",
47             "-fsanitize=returns-nonnull-attribute")
48 UBSAN_CHECK(InvalidNullArgument, "invalid-null-argument",
49             "-fsanitize=nonnull-attribute")
50 UBSAN_CHECK(DynamicTypeMismatch, "dynamic-type-mismatch", "-fsanitize=vptr")
51 UBSAN_CHECK(CFIBadType, "cfi-bad-type", "-fsanitize=cfi")