net: fix use-after-free in slab compaction (#3019)

An off-by-one bug results in freeing the incorrect page. This
also adds an `asan` CI job.

Fixes: 3014
This commit is contained in:
Carl Lerche
2020-10-21 14:43:57 -07:00
committed by GitHub
parent 8dbc3c7937
commit b48fec9655
2 changed files with 65 additions and 3 deletions
+15
View File
@@ -112,6 +112,21 @@ jobs:
- name: miri
run: cargo miri test --features rt,rt-multi-thread,sync task
working-directory: tokio
san:
name: san
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.nightly }}
override: true
- name: asan
run: cargo test --all-features --target x86_64-unknown-linux-gnu --lib -- --test-threads 1
working-directory: tokio
env:
RUSTFLAGS: -Z sanitizer=address
ASAN_OPTIONS: detect_leaks=0
cross:
name: cross