Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Try to fix x86_64-apple-darwin release builds (#12245)

Alex Crichtonfe12d384cb0c
diff --git a/crates/wasmtime/src/runtime/vm/stack_switching/stack/unix.rs b/crates/wasmtime/src/runtime/vm/stack_switching/stack/unix.rs
index 2c3aef922d..a2c1712608 100644
--- a/crates/wasmtime/src/runtime/vm/stack_switching/stack/unix.rs
+++ b/crates/wasmtime/src/runtime/vm/stack_switching/stack/unix.rs
@@ -258,7 +258,7 @@ impl VMContinuationStack {
let to_store = [
// Data near top of stack:
- (0x08, (wasmtime_continuation_start as *const ()).addr()),
+ (0x08, wasmtime_continuation_start_address().addr()),
(0x10, tos.sub(0x10).addr()),
(0x18, tos.sub(0x40 + args_data_size).addr()),
(0x20, usize::try_from(args_capacity).unwrap()),
diff --git a/crates/wasmtime/src/runtime/vm/stack_switching/stack/unix/x86_64.rs b/crates/wasmtime/src/runtime/vm/stack_switching/stack/unix/x86_64.rs
index 8591a933f0..c202f70ee1 100644
--- a/crates/wasmtime/src/runtime/vm/stack_switching/stack/unix/x86_64.rs
+++ b/crates/wasmtime/src/runtime/vm/stack_switching/stack/unix/x86_64.rs
@@ -7,6 +7,11 @@
use core::arch::naked_asm;
+#[inline(never)] // FIXME(rust-lang/rust#148307)
+pub fn wasmtime_continuation_start_address() -> *const () {
+ wasmtime_continuation_start as *const ()
+}
+
// This is a pretty special function that has no real signature. Its use is to
// be the "base" function of all fibers. This entrypoint is used in
// `wasmtime_continuation_init` to bootstrap the execution of a new fiber.