]> git.ipfire.org Git - thirdparty/gcc.git/blame - libsanitizer/ubsan/ubsan_checks.inc
Fix formatting in rs6000.c.
[thirdparty/gcc.git] / libsanitizer / ubsan / ubsan_checks.inc
CommitLineData
696d846a
MO
1//===-- ubsan_checks.inc ----------------------------------------*- C++ -*-===//
2//
b667dd70
ML
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
696d846a
MO
6//
7//===----------------------------------------------------------------------===//
8//
9// List of checks handled by UBSan runtime.
10//
11//===----------------------------------------------------------------------===//
12#ifndef UBSAN_CHECK
13# error "Define UBSAN_CHECK prior to including this file!"
14#endif
15
10189819
MO
16// UBSAN_CHECK(Name, SummaryKind, FSanitizeFlagName)
17// SummaryKind and FSanitizeFlagName should be string literals.
696d846a 18
10189819
MO
19UBSAN_CHECK(GenericUB, "undefined-behavior", "undefined")
20UBSAN_CHECK(NullPointerUse, "null-pointer-use", "null")
3c6331c2
ML
21UBSAN_CHECK(NullPointerUseWithNullability, "null-pointer-use",
22 "nullability-assign")
3ca75cd5
ML
23UBSAN_CHECK(NullptrWithOffset, "nullptr-with-offset", "pointer-overflow")
24UBSAN_CHECK(NullptrWithNonZeroOffset, "nullptr-with-nonzero-offset",
25 "pointer-overflow")
26UBSAN_CHECK(NullptrAfterNonZeroOffset, "nullptr-after-nonzero-offset",
27 "pointer-overflow")
c9b39a49 28UBSAN_CHECK(PointerOverflow, "pointer-overflow", "pointer-overflow")
10189819 29UBSAN_CHECK(MisalignedPointerUse, "misaligned-pointer-use", "alignment")
b667dd70 30UBSAN_CHECK(AlignmentAssumption, "alignment-assumption", "alignment")
10189819 31UBSAN_CHECK(InsufficientObjectSize, "insufficient-object-size", "object-size")
696d846a 32UBSAN_CHECK(SignedIntegerOverflow, "signed-integer-overflow",
10189819 33 "signed-integer-overflow")
696d846a 34UBSAN_CHECK(UnsignedIntegerOverflow, "unsigned-integer-overflow",
10189819 35 "unsigned-integer-overflow")
696d846a 36UBSAN_CHECK(IntegerDivideByZero, "integer-divide-by-zero",
10189819
MO
37 "integer-divide-by-zero")
38UBSAN_CHECK(FloatDivideByZero, "float-divide-by-zero", "float-divide-by-zero")
5d3805fc 39UBSAN_CHECK(InvalidBuiltin, "invalid-builtin-use", "invalid-builtin-use")
eac97531
ML
40UBSAN_CHECK(ImplicitUnsignedIntegerTruncation,
41 "implicit-unsigned-integer-truncation",
42 "implicit-unsigned-integer-truncation")
43UBSAN_CHECK(ImplicitSignedIntegerTruncation,
44 "implicit-signed-integer-truncation",
45 "implicit-signed-integer-truncation")
b667dd70
ML
46UBSAN_CHECK(ImplicitIntegerSignChange,
47 "implicit-integer-sign-change",
48 "implicit-integer-sign-change")
49UBSAN_CHECK(ImplicitSignedIntegerTruncationOrSignChange,
50 "implicit-signed-integer-truncation-or-sign-change",
51 "implicit-signed-integer-truncation,implicit-integer-sign-change")
10189819
MO
52UBSAN_CHECK(InvalidShiftBase, "invalid-shift-base", "shift-base")
53UBSAN_CHECK(InvalidShiftExponent, "invalid-shift-exponent", "shift-exponent")
54UBSAN_CHECK(OutOfBoundsIndex, "out-of-bounds-index", "bounds")
55UBSAN_CHECK(UnreachableCall, "unreachable-call", "unreachable")
56UBSAN_CHECK(MissingReturn, "missing-return", "return")
57UBSAN_CHECK(NonPositiveVLAIndex, "non-positive-vla-index", "vla-bound")
58UBSAN_CHECK(FloatCastOverflow, "float-cast-overflow", "float-cast-overflow")
59UBSAN_CHECK(InvalidBoolLoad, "invalid-bool-load", "bool")
60UBSAN_CHECK(InvalidEnumLoad, "invalid-enum-load", "enum")
61UBSAN_CHECK(FunctionTypeMismatch, "function-type-mismatch", "function")
696d846a 62UBSAN_CHECK(InvalidNullReturn, "invalid-null-return",
10189819 63 "returns-nonnull-attribute")
3c6331c2
ML
64UBSAN_CHECK(InvalidNullReturnWithNullability, "invalid-null-return",
65 "nullability-return")
10189819 66UBSAN_CHECK(InvalidNullArgument, "invalid-null-argument", "nonnull-attribute")
3c6331c2
ML
67UBSAN_CHECK(InvalidNullArgumentWithNullability, "invalid-null-argument",
68 "nullability-arg")
10189819
MO
69UBSAN_CHECK(DynamicTypeMismatch, "dynamic-type-mismatch", "vptr")
70UBSAN_CHECK(CFIBadType, "cfi-bad-type", "cfi")