0.1.0-alpha.2: fix use-after-free race - guard EVERY arena-recycle pa… #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 # submodules NOT needed for the Rust gates | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: fmt | |
| run: cargo fmt --all --check | |
| - name: clippy (all features) | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: check (no features) | |
| run: cargo check --workspace --all-targets | |
| - name: test (all features) | |
| run: cargo test --workspace --all-features | |
| # The compile-gate rule: both tier-1 targets checked even where they don't run. | |
| cross-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-pc-windows-msvc | |
| - name: check windows target from linux | |
| run: cargo check --workspace --target x86_64-pc-windows-msvc | |
| # G4: the os-layer logic must stay UB-free under miri against the mock prim. | |
| miri: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: miri | |
| - name: miri (mock prim backend) | |
| run: cargo +nightly miri test -p rusty_alloc | |
| # wasm is a shipped target, so it gets a gate that EXECUTES rather than one | |
| # that only compiles: `cargo test` cannot run wasm32-unknown-unknown, so the | |
| # self-test is instantiated in a real VM under node. | |
| wasm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: check core for wasm32 | |
| run: cargo check -p rusty_alloc --target wasm32-unknown-unknown | |
| - name: build wasm self-test | |
| run: cargo build -p rusty_alloc-wasm --target wasm32-unknown-unknown --release | |
| - name: run self-test inside a WebAssembly VM | |
| run: node bench/wasm-selftest.mjs target/wasm32-unknown-unknown/release/rusty_alloc_wasm.wasm | |
| oracle: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: build oracle arms | |
| run: bash oracle/build.sh | |
| # OS-NAMESPACED output: oracle/build.sh writes to out/<uname>/<arm> because | |
| # this repo is shared between Windows and WSL and a mixed-OS cmake cache in | |
| # one directory corrupts both builds. | |
| - name: oracle version gate | |
| run: | | |
| set -e | |
| out="oracle/out/$(uname -s | tr '[:upper:]' '[:lower:]')/mi" | |
| ls -la "$out" | |
| test -e "$out/libmimalloc.so" |