| 1 |
# This file contains suppressions for the default (with GIL) build to prevent runtime errors |
| 2 |
# when numpy is built with -Db_sanitize=undefined for x86_64 architecture |
| 3 |
# |
| 4 |
# reference: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#available-checks |
| 5 |
|
| 6 |
# Per this prior discussion, integer overflow is not a concern |
| 7 |
# https://github.com/numpy/numpy/issues/24209#issuecomment-2160154181 |
| 8 |
signed-integer-overflow:* |
| 9 |
|
| 10 |
# all alignment runtime errors ignored in favor of this being tracked via TypeSanitizer |
| 11 |
# otherwise ubsan may detect system file alignment errors outside numpy |
| 12 |
alignment:* |
| 13 |
|
| 14 |
# suggested fix for runtime error: use INT_MIN constant |
| 15 |
shift-base:_core/src/umath/_rational_tests.c |
| 16 |
# suggested fix for runtime error: check for overflow if signed |
| 17 |
shift-base:_core/src/npymath/npy_math_internal.h |
| 18 |
|
| 19 |
|
| 20 |
# suggested fix for runtime error: check that pointer is not null before calling function |
| 21 |
nonnull-attribute:_core/src/multiarray/array_coercion.c |
| 22 |
nonnull-attribute:_core/src/multiarray/ctors.c |
| 23 |
nonnull-attribute:_core/src/multiarray/datetime_busdaycal.c |
| 24 |
nonnull-attribute:_core/src/multiarray/scalarapi.c |
| 25 |
nonnull-attribute:_core/src/multiarray/calculation.c |
| 26 |
|
| 27 |
# suggested fix for runtime error: null check before loop |
| 28 |
pointer-overflow:_core/src/multiarray/nditer_templ.c |