summaryrefslogtreecommitdiff
path: root/wasm2c
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2018-08-14 11:23:02 -0700
committerGitHub <noreply@github.com>2018-08-14 11:23:02 -0700
commit0d683b182258b1e04cbbcfb319f0107b6790df36 (patch)
tree737e0df849e285f8d50649144963e7403be0360a /wasm2c
parent69a7704723176ad656db8b79cd2146f456d36fbd (diff)
downloadwabt-0d683b182258b1e04cbbcfb319f0107b6790df36.tar.gz
wabt-0d683b182258b1e04cbbcfb319f0107b6790df36.tar.bz2
wabt-0d683b182258b1e04cbbcfb319f0107b6790df36.zip
[wasm2c] Add spec tests; fix update-spec-tests.py (#891)
`update-spec-tests.py` now will update the tests in the `test/wasm2c/spec` directory.
Diffstat (limited to 'wasm2c')
-rw-r--r--wasm2c/wasm-rt-impl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wasm2c/wasm-rt-impl.c b/wasm2c/wasm-rt-impl.c
index a3f25760..2404d7d1 100644
--- a/wasm2c/wasm-rt-impl.c
+++ b/wasm2c/wasm-rt-impl.c
@@ -106,6 +106,7 @@ uint32_t wasm_rt_grow_memory(wasm_rt_memory_t* memory, uint32_t delta) {
memory->pages = new_pages;
memory->size = new_pages * PAGE_SIZE;
memory->data = realloc(memory->data, memory->size);
+ memset(memory->data + old_pages * PAGE_SIZE, 0, delta * PAGE_SIZE);
return old_pages;
}