Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 2d6312b

Browse files
committed
fix stack switching compilation error
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
1 parent 33062f2 commit 2d6312b

File tree

1 file changed

+6
-2
lines changed
  • crates/wasmtime/src/runtime/vm/stack_switching/stack

1 file changed

+6
-2
lines changed

crates/wasmtime/src/runtime/vm/stack_switching/stack/unix.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ unsafe extern "C" fn fiber_start(
310310
return_value_count: u32,
311311
) {
312312
unsafe {
313-
let func_ref = func_ref.as_ref().expect("Non-null function reference");
314313
let caller_vmxtx = VMOpaqueContext::from_vmcontext(NonNull::new_unchecked(caller_vmctx));
315314
let args = &mut *args;
316315
let params_and_returns: NonNull<[ValRaw]> = if args.capacity == 0 {
@@ -333,7 +332,12 @@ unsafe extern "C" fn fiber_start(
333332
//
334333
// TODO(dhil): we are ignoring the boolean return value
335334
// here... we probably shouldn't.
336-
func_ref.array_call(None, caller_vmxtx, params_and_returns);
335+
VMFuncRef::array_call(
336+
NonNull::new(func_ref as *mut _).unwrap(),
337+
None,
338+
caller_vmxtx,
339+
params_and_returns,
340+
);
337341

338342
// The array call trampoline should have just written
339343
// `return_value_count` values to the `args` buffer. Let's reflect that

0 commit comments

Comments
 (0)