Skip to content

Commit 3cbabb7

Browse files
committed
fix(go): casting unsafe pointer to uintptr type when passed to wasm_import_* functions
Signed-off-by: Andrew Steurer <[email protected]>
1 parent a670e8c commit 3cbabb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/go/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ impl Go {
10061006
format!(
10071007
"{params_pointer} := wit_runtime.Allocate({PINNER}, {size}, {align})\n{code}"
10081008
),
1009-
vec![params_pointer],
1009+
vec![format!("uintptr({params_pointer})")],
10101010
)
10111011
} else {
10121012
let wasm_params = go_param_names
@@ -1057,6 +1057,7 @@ return {results}"
10571057
String::new()
10581058
};
10591059

1060+
// TODO: one of the wasm_params is missing a uintptr cast
10601061
format!(
10611062
"{lower}
10621063
wit_async.SubtaskWait(uint32({raw_name}({wasm_params})))

0 commit comments

Comments
 (0)