peterhuene opened Issue #2784 (assigned to peterhuene):
Steps to Reproduce
On Linux, build
wasmtime
with theuffd
feature and run the following:let wat = r#" (module (memory (export "memory") 100) (data (i32.const 0) "Hello World!") )"#; let engine = Engine::default(); let module = Module::new(&engine, wat)?; let store = Store::new(&engine); Instance::new(&store, &module, &[])?;
Expected Results
The module should instantiate.
Actual Results
Panic:
thread 'main' panicked at 'source slice length (65536) does not match destination slice length (6553600)'
Caused by this call to
copy_from_slice
that did not properly provide an upper-bound for the range.This was missed by the uffd tests because they specifically use the pooling allocator which skips initialization of the data segments by not calling
initialize_instance
.The tests should also be run with the on-demand allocator with the uffd feature enabled.
Versions and Environment
Wasmtime version or commit:
HEAD
Operating system: Linux with
uffd
featureArchitecture: x86_64
peterhuene assigned Issue #2784 (assigned to peterhuene):
Steps to Reproduce
On Linux, build
wasmtime
with theuffd
feature and run the following:let wat = r#" (module (memory (export "memory") 100) (data (i32.const 0) "Hello World!") )"#; let engine = Engine::default(); let module = Module::new(&engine, wat)?; let store = Store::new(&engine); Instance::new(&store, &module, &[])?;
Expected Results
The module should instantiate.
Actual Results
Panic:
thread 'main' panicked at 'source slice length (65536) does not match destination slice length (6553600)'
Caused by this call to
copy_from_slice
that did not properly provide an upper-bound for the range.This was missed by the uffd tests because they specifically use the pooling allocator which skips initialization of the data segments by not calling
initialize_instance
.The tests should also be run with the on-demand allocator with the uffd feature enabled.
Versions and Environment
Wasmtime version or commit:
HEAD
Operating system: Linux with
uffd
featureArchitecture: x86_64
peterhuene labeled Issue #2784 (assigned to peterhuene):
Steps to Reproduce
On Linux, build
wasmtime
with theuffd
feature and run the following:let wat = r#" (module (memory (export "memory") 100) (data (i32.const 0) "Hello World!") )"#; let engine = Engine::default(); let module = Module::new(&engine, wat)?; let store = Store::new(&engine); Instance::new(&store, &module, &[])?;
Expected Results
The module should instantiate.
Actual Results
Panic:
thread 'main' panicked at 'source slice length (65536) does not match destination slice length (6553600)'
Caused by this call to
copy_from_slice
that did not properly provide an upper-bound for the range.This was missed by the uffd tests because they specifically use the pooling allocator which skips initialization of the data segments by not calling
initialize_instance
.The tests should also be run with the on-demand allocator with the uffd feature enabled.
Versions and Environment
Wasmtime version or commit:
HEAD
Operating system: Linux with
uffd
featureArchitecture: x86_64
peterhuene commented on Issue #2784:
I think we missed this in the wast tests because a lot of them use an initial size of the memory of
1
, which would cause the range to be correct.
peterhuene edited a comment on Issue #2784:
I think we missed this in the wast tests because a lot of them use an initial size of the memory of
1
, which would cause the range to be correct for initializing the data segments.
peterhuene closed Issue #2784 (assigned to peterhuene):
Steps to Reproduce
On Linux, build
wasmtime
with theuffd
feature and run the following:let wat = r#" (module (memory (export "memory") 100) (data (i32.const 0) "Hello World!") )"#; let engine = Engine::default(); let module = Module::new(&engine, wat)?; let store = Store::new(&engine); Instance::new(&store, &module, &[])?;
Expected Results
The module should instantiate.
Actual Results
Panic:
thread 'main' panicked at 'source slice length (65536) does not match destination slice length (6553600)'
Caused by this call to
copy_from_slice
that did not properly provide an upper-bound for the range.This was missed by the uffd tests because they specifically use the pooling allocator which skips initialization of the data segments by not calling
initialize_instance
.The tests should also be run with the on-demand allocator with the uffd feature enabled.
Versions and Environment
Wasmtime version or commit:
HEAD
Operating system: Linux with
uffd
featureArchitecture: x86_64
Last updated: Dec 23 2024 at 12:05 UTC