Skip to content

Commit

Permalink
Fix build of c-api and tests
Browse files Browse the repository at this point in the history
prtest:full
  • Loading branch information
alexcrichton committed Sep 24, 2024
1 parent 032d86b commit 57872d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/c-api/src/async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ unsafe impl StackMemory for CHostStackMemory {
let base = unsafe { top.sub(len) as usize };
base..base + len
}
fn guard_range(&self) -> Range<*mut u8> {
std::ptr::null_mut()..std::ptr::null_mut()
}
}

pub type wasmtime_new_stack_memory_callback_t = extern "C" fn(
Expand Down
3 changes: 3 additions & 0 deletions tests/all/stack_creator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ unsafe impl StackMemory for CustomStack {
let base = self.base.as_ptr() as usize;
base..base + self.len
}
fn guard_range(&self) -> Range<*mut u8> {
std::ptr::null_mut()..std::ptr::null_mut()
}
}

// A creator that allocates stacks on the heap instead of mmap'ing.
Expand Down

0 comments on commit 57872d0

Please sign in to comment.