Update behavior of zero-length lists/strings (#4648)

The spec was expected to change to not bounds-check 0-byte lists/strings
but has since been updated to match `memory.copy` which does indeed
check the pointer for 0-byte copies.
This commit is contained in:
Alex Crichton
2022-08-09 09:26:33 -05:00
committed by GitHub
parent 8aee85ebaa
commit 867f5c1244
5 changed files with 89 additions and 184 deletions

View File

@@ -130,4 +130,4 @@
)
(export "empty-list" (func $f))
)
(assert_return (invoke "empty-list" (list.const)) (unit.const))
(assert_trap (invoke "empty-list" (list.const)) "realloc return: beyond end of memory")