|
| 1 | +/*===-- UbsanMinimalHandlers.inc - ubsan minimum handlers ------*- C++ -*-=== *\ |
| 2 | +|* |
| 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 |
| 6 | +|* |
| 7 | +\*===----------------------------------------------------------------------===*/ |
| 8 | + |
| 9 | +// There are two copies of this file, one in LLVM and one in compiler-rt. |
| 10 | +// These two MUST BE KEPT IN SYNC. |
| 11 | +// * llvm/include/llvm/Transforms/Instrumentation/UbsanMinimalHandlers.inc |
| 12 | +// * compiler-rt/lib/ubsan_minimal/UbsanMinimalHandlers.inc |
| 13 | + |
| 14 | +#ifndef UBSAN_HANDLER_PTR |
| 15 | +#define UBSAN_HANDLER_PTR(Enum, String) |
| 16 | +#endif |
| 17 | + |
| 18 | +#ifndef UBSAN_HANDLER |
| 19 | +#define UBSAN_HANDLER(Enum, String) |
| 20 | +#endif |
| 21 | + |
| 22 | +#ifndef UBSAN_HANDLER_RECOVER |
| 23 | +#define UBSAN_HANDLER_RECOVER(Enum, String) |
| 24 | +#endif |
| 25 | + |
| 26 | +UBSAN_HANDLER_PTR(type_mismatch, "type-mismatch") |
| 27 | +UBSAN_HANDLER(alignment_assumption, "alignment-assumption") |
| 28 | +UBSAN_HANDLER(add_overflow, "add-overflow") |
| 29 | +UBSAN_HANDLER(sub_overflow, "sub-overflow") |
| 30 | +UBSAN_HANDLER(mul_overflow, "mul-overflow") |
| 31 | +UBSAN_HANDLER(negate_overflow, "negate-overflow") |
| 32 | +UBSAN_HANDLER(divrem_overflow, "divrem-overflow") |
| 33 | +UBSAN_HANDLER(shift_out_of_bounds, "shift-out-of-bounds") |
| 34 | +UBSAN_HANDLER(out_of_bounds, "out-of-bounds") |
| 35 | +UBSAN_HANDLER(local_out_of_bounds, "local-out-of-bounds") |
| 36 | +UBSAN_HANDLER_RECOVER(builtin_unreachable, "builtin-unreachable") |
| 37 | +UBSAN_HANDLER_RECOVER(missing_return, "missing-return") |
| 38 | +UBSAN_HANDLER(vla_bound_not_positive, "vla-bound-not-positive") |
| 39 | +UBSAN_HANDLER(float_cast_overflow, "float-cast-overflow") |
| 40 | +UBSAN_HANDLER(load_invalid_value, "load-invalid-value") |
| 41 | +UBSAN_HANDLER(invalid_builtin, "invalid-builtin") |
| 42 | +UBSAN_HANDLER(invalid_objc_cast, "invalid-objc-cast") |
| 43 | +UBSAN_HANDLER(function_type_mismatch, "function-type-mismatch") |
| 44 | +UBSAN_HANDLER(implicit_conversion, "implicit-conversion") |
| 45 | +UBSAN_HANDLER(nonnull_arg, "nonnull-arg") |
| 46 | +UBSAN_HANDLER(nonnull_return, "nonnull-return") |
| 47 | +UBSAN_HANDLER(nullability_arg, "nullability-arg") |
| 48 | +UBSAN_HANDLER(nullability_return, "nullability-return") |
| 49 | +UBSAN_HANDLER(pointer_overflow, "pointer-overflow") |
| 50 | +UBSAN_HANDLER(cfi_check_fail, "cfi-check-fail") |
0 commit comments