Skip to content

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

Add some more FIXMEs for memory64 & async (#14751)

Alex Crichton785ff76246c9
diff --git a/crates/environ/src/fact/signature.rs b/crates/environ/src/fact/signature.rs
index bfe3a865d2..a6e7439c15 100644
--- a/crates/environ/src/fact/signature.rs
+++ b/crates/environ/src/fact/signature.rs
@@ -162,6 +162,9 @@ impl ComponentTypesBuilder {
let lower_result_tys = &self[lower_ty.results];
let results = if lower.options.async_ {
// Add return pointer
+ //
+ // FIXME(#4311): the return pointer points into the caller's
+ // memory, so this should be the lower side's pointer type.
if !lower_result_tys.types.is_empty() {
params.push(lift_ptr_ty);
}
@@ -175,6 +178,10 @@ impl ComponentTypesBuilder {
Some(list) => list,
None => {
// Add return pointer
+ //
+ // FIXME(#4311): the return pointer points into the
+ // caller's memory, so this should be the lower side's
+ // pointer type.
params.push(lift_ptr_ty);
Vec::new()
}
diff --git a/crates/wasmtime/src/runtime/component/concurrent.rs b/crates/wasmtime/src/runtime/component/concurrent.rs
index 5e3c2d3ef4..e3198656ce 100644
--- a/crates/wasmtime/src/runtime/component/concurrent.rs
+++ b/crates/wasmtime/src/runtime/component/concurrent.rs
@@ -2634,7 +2634,7 @@ impl StoreOpaque {
/// actually run any wasm code yet. This requires cleaning up metadata such
/// as thread information attached to the task.
///
- /// This is used for task cancellation via `subtask.cancel`, the intrinsic.
+ /// This is used for task cancellation via `subtask.cancel`, the intrinsic.
fn cancel_guest_subtask_without_lowered_parameters(
&mut self,
caller_instance: RuntimeInstance,
@@ -3296,6 +3296,7 @@ impl Instance {
has_result: true,
params,
} => ResultInfo::Heap {
+ // FIXME(#4311): needs to read an i64 for memory64
results: match params.last() {
Some(r) => r.get_u32(),
None => bail_bug!("retptr missing"),
@@ -3308,6 +3309,7 @@ impl Instance {
result_count,
params,
} if *result_count > u32::try_from(MAX_FLAT_RESULTS)? => ResultInfo::Heap {
+ // FIXME(#4311): needs to read an i64 for memory64
results: match params.last() {
Some(r) => r.get_u32(),
None => bail_bug!("arg ptr missing"),