Skip to content

tpacketv3: Use type definitions from libc crate #322

tpacketv3: Use type definitions from libc crate

tpacketv3: Use type definitions from libc crate #322

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
name: Run Sanitizers
jobs:
sanitizers:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
sanitizer: [ address ]
steps:
- name: Install dependencies
run: sudo apt -y update && sudo apt -y install flex bison
if: ${{ startsWith(matrix.os, 'ubuntu') }}
- uses: actions/checkout@v4
- uses: sensorfu/setup-rust-action@v1
with:
toolchain: nightly
components: rust-src
- run: |
echo "TARGET=$(rustc -vV | awk '/^host: / { print $2 }')" >>${GITHUB_ENV}
- name: Run ${{ matrix.sanitizer }} sanitizer for ${{ env.TARGET }}
env:
RUSTFLAGS: -Z sanitizer=${{ matrix.sanitizer }}
RUSTDOCFLAGS: -Z sanitizer=${{ matrix.sanitizer }}
ASAN_OPTIONS: verbose=1:atexit=1:detect_stack_use_after_return=1:strict_string_checks=1
run: cargo test -Zbuild-std --target ${{ env.TARGET }}