Skip to content

Commit

Permalink
Fix asan build of wasmtime-fiber
Browse files Browse the repository at this point in the history
This commit fixes an issue with bytecodealliance#9304 where the asan build of
`wasmtime-fiber` has broken which was preventing oss-fuzz from updating
and making progress.
  • Loading branch information
alexcrichton committed Sep 30, 2024
1 parent eb07b15 commit 9017c00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,9 @@ jobs:
- run: sudo apt-get update && sudo apt install -y ocaml-nox ocamlbuild ocaml-findlib libzarith-ocaml-dev
- run: cargo fetch
working-directory: ./fuzz
- run: cargo fuzz build --dev -s none
- run: cargo fuzz build --dev -s none --fuzz-dir ./cranelift/isle/fuzz
- run: cargo fuzz build --dev -s none --fuzz-dir ./crates/environ/fuzz --features component-model
- run: cargo fuzz build --dev
- run: cargo fuzz build --dev --fuzz-dir ./cranelift/isle/fuzz
- run: cargo fuzz build --dev --fuzz-dir ./crates/environ/fuzz --features component-model

# common logic to cancel the entire run if this job fails
- run: gh run cancel ${{ github.run_id }}
Expand Down
4 changes: 4 additions & 0 deletions crates/fiber/src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ mod asan {
let end = base + self.0.mapping_len;
base + page_size()..end
}

fn guard_range(&self) -> Range<*mut u8> {
self.0.mapping_base..self.0.mapping_base.wrapping_add(page_size())
}
}

impl Drop for AsanFiberStack {
Expand Down

0 comments on commit 9017c00

Please sign in to comment.