Skip to content

Miscellaneous fixes #601

Miscellaneous fixes

Miscellaneous fixes #601

Workflow file for this run

# Copyright 2023-2024, Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
name: Sanitizers
permissions: read-all
on:
pull_request:
workflow_dispatch:
env:
LLVM_REPO: https://github.com/ispc/ispc.dependencies
jobs:
linux-ispc-llvm17-asan:
runs-on: ubuntu-latest
env:
LLVM_VERSION: "17.0"
LLVM_TAR: llvm-17.0.6-ubuntu18.04-Release+Asserts-x86.arm.wasm.tar.xz
ISPC_OPAQUE_PTR_MODE: "ON"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
.github/workflows/scripts/install-build-deps.sh
# We will use system gcc until we rebuild LLVM with compiler-rt.
- name: Check environment
run: |
which -a gcc
cat /proc/cpuinfo
- name: Build ISPC with ASAN
run: |
cmake -B build -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_FLAGS="-fsanitize=address -O0 -g3" -DCMAKE_CXX_FLAGS="-fsanitize=address -O0 -g3"
cmake --build build --target ispc ispc-opt -j4
# Address sanitizer includes leak sanitizer but we don't want it to report
# all leaks at the moment because there are quite a lot if them.
# So, we disable leaks detection to have clean report.
- name: Build examples with ASAN
run: |
ASAN_OPTIONS=detect_leaks=1 cmake --build build --target ispc_cpu_examples -j4
- name: Build LIT tests with ASAN
run: |
ASAN_OPTIONS=detect_leaks=1 cmake --build build --target check-all
- name: Build runtime tests with ASAN
run: |
ASAN_OPTIONS=detect_leaks=1 PATH=`pwd`/build/bin:$PATH ./run_tests.py --target=avx2-i32x8 --arch=x86-64