| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,7 +61,7 @@ jobs: | |||
| 61 | 61 | || '' | |
| 62 | 62 | }}.txt handle_segv=0" >> "$GITHUB_ENV" | |
| 63 | 63 | else | |
| 64 | - echo "UBSAN_OPTIONS=${SAN_LOG_OPTION}" >> "$GITHUB_ENV" | ||
| 64 | + echo "UBSAN_OPTIONS=${SAN_LOG_OPTION} halt_on_error=1 suppressions=${GITHUB_WORKSPACE}/Tools/ubsan/suppressions.txt" >> "$GITHUB_ENV" | ||
| 65 | 65 | fi | |
| 66 | 66 | echo "CC=clang" >> "$GITHUB_ENV" | |
| 67 | 67 | echo "CXX=clang++" >> "$GITHUB_ENV" | |
@@ -75,18 +75,21 @@ jobs: | |||
| 75 | 75 | ${{ | |
| 76 | 76 | inputs.sanitizer == 'TSan' | |
| 77 | 77 | && '--with-thread-sanitizer' | |
| 78 | - || '--with-undefined-behavior-sanitizer' | ||
| 78 | + || '--with-undefined-behavior-sanitizer --with-strict-overflow' | ||
| 79 | 79 | }} | |
| 80 | 80 | --with-pydebug | |
| 81 | 81 | ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }} | |
| 82 | 82 | - name: Build CPython | |
| 83 | 83 | run: make -j4 | |
| 84 | 84 | - name: Display build info | |
| 85 | 85 | run: make pythoninfo | |
| 86 | + # test_{capi,faulthandler} are skipped under UBSan because | ||
| 87 | + # they raise signals that UBSan with halt_on_error=1 intercepts. | ||
| 86 | 88 | - name: Tests | |
| 87 | 89 | run: >- | |
| 88 | 90 | ./python -m test | |
| 89 | 91 | ${{ inputs.sanitizer == 'TSan' && '--tsan' || '' }} | |
| 92 | + ${{ inputs.sanitizer == 'UBSan' && '-x test_capi -x test_faulthandler' || '' }} | ||
| 90 | 93 | -j4 | |
| 91 | 94 | - name: Parallel tests | |
| 92 | 95 | if: >- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,28 @@ | |||
| 1 | + # This file contains suppressions for the UndefinedBehaviour sanitizer. | ||
| 2 | + # | ||
| 3 | + # Reference: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#runtime-suppressions | ||
| 4 | + # | ||
| 5 | + # When adding a suppression, include a comment referencing a GitHub issue | ||
| 6 | + # that describes how to reproduce the race and includes the relevant UBSan | ||
| 7 | + # output. | ||
| 8 | + | ||
| 9 | + # Objects/object.c:97:5: runtime error: member access within null pointer of type 'PyThreadState' (aka 'struct _ts') | ||
| 10 | + null:Objects/object.c | ||
| 11 | + | ||
| 12 | + # Objects/memoryobject.c:3032:15: runtime error: load of value 2, which is not a valid value for type 'bool' | ||
| 13 | + bool:Objects/memoryobject.c | ||
| 14 | + | ||
| 15 | + # Modules/_ctypes/cfield.c:644:1: runtime error: left shift of 1 by 63 places cannot be represented in type 'int64_t' (aka 'long') | ||
| 16 | + shift-base:Modules/_ctypes/cfield.c | ||
| 17 | + | ||
| 18 | + # Modules/_ctypes/cfield.c:640:1: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int' | ||
| 19 | + signed-integer-overflow:Modules/_ctypes/cfield.c | ||
| 20 | + | ||
| 21 | + # Modules/_zstd/decompressor.c:598:56: runtime error: applying non-zero offset 18446744073709551615 to null pointer | ||
| 22 | + pointer-overflow:Modules/_zstd/decompressor.c | ||
| 23 | + | ||
| 24 | + # Modules/_io/stringio.c:350:24: runtime error: addition of unsigned offset to 0x7fd01ec25850 overflowed to 0x7fd01ec2584c | ||
| 25 | + pointer-overflow:Modules/_io/stringio.c | ||
| 26 | + | ||
| 27 | + # Objects/bytesobject.c:1190:25: runtime error: applying zero offset to null pointer | ||
| 28 | + pointer-overflow:Objects/bytesobject.c | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments