8000 CI: add llvm/clang sanitizer tests by ngoldbaum · Pull Request #26295 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

CI: add llvm/clang sanitizer tests #26295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/linux_compiler_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:
contents: read # to fetch code (actions/checkout)

jobs:
gcc_sanitizers:
clang_sanitizers:
# To enable this workflow on a fork, comment out:
if: github.repository == 'numpy/numpy'
runs-on: ubuntu-latest
Expand All @@ -35,6 +35,8 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y llvm libstdc++-12-dev
pip install -r requirements/build_requirements.txt
pip install -r requirements/ci_requirements.txt
- name: Build
Expand All @@ -43,7 +45,7 @@ jobs:
TERM: xterm-256color
PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas
run:
spin build --with-scipy-openblas=32 -- --werror -Db_sanitize=address,undefined
CC=clang CXX=clang++ spin build --with-scipy-openblas=32 -- -Db_sanitize=address,undefined
- name: Test
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
env:
Expand All @@ -52,5 +54,5 @@ jobs:
pip install pytest pytest-xdist hypothesis typing_extensions
ASAN_OPTIONS=detect_leaks=0:symbolize=1:strict_init_order=true:allocator_may_return_null=1:halt_on_error=1 \
UBSAN_OPTIONS=halt_on_error=0 \
LD_PRELOAD=$(gcc --print-file-name=libasan.so) \
LD_PRELOAD=$(clang --print-file-name=libclang_rt.asan-x86_64.so) \
python -m spin test -- -v -s
0