Skip to content

Commit 31719d1

Browse files
authored
Adjust validation of memory in canonopts (#633)
Change the subtyping check to check for `(memory 0)` instead of `(memory 1)` to allow memories that start empty but are allowed to grow. This is a bit more relaxed from the previous predicate while still restricting it to non-shared, 32-bit, 64k page-size memories.
1 parent 9a183e5 commit 31719d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

design/mvp/CanonicalABI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3187,7 +3187,7 @@ specifying `string-encoding=utf8` twice is an error. Each individual option, if
31873187
present, is validated as such:
31883188

31893189
* `string-encoding=N` - can be passed at most once, regardless of `N`.
3190-
* `memory` - this is a subtype of `(memory 1)`
3190+
* `memory` - this is a subtype of `(memory 0)`
31913191
* `realloc` - the function has type `(func (param i32 i32 i32 i32) (result i32))`
31923192
* if `realloc` is present, then `memory` must be present
31933193
* `post-return` - only allowed on [`canon lift`](#canon-lift), which has rules

0 commit comments

Comments
 (0)