-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly disallow 64-bit/shared memories/tables in components (#1970)
These proposals are not specified how they work with the canonical ABI just yet. Previously the proposals were not enabled by default so their off-by-default status largely gated their usage in components but with memory64 now being on-by-default it's possible to have components using 64-bit linear memories. More care will be needed to update components and tooling for 64-bit linear memories so for now an error is added to reject it saying that support is not added yet.
- Loading branch information
1 parent
34c5c39
commit 31c5811
Showing
5 changed files
with
104 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tests/local/component-model/shared-everything-threads/not-accepted.wast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(assert_invalid | ||
(component | ||
(core module $A | ||
(memory (export "m") 1 2 shared)) | ||
(core instance $A (instantiate $A)) | ||
(alias core export $A "m" (core memory $m)) | ||
) | ||
"shared linear memories are not compatible with components yet") | ||
|
||
(assert_invalid | ||
(component | ||
(core module $A | ||
(table (export "m") shared 1 2 (ref null (shared func))) | ||
) | ||
(core instance $A (instantiate $A)) | ||
(alias core export $A "m" (core table $m)) | ||
) | ||
"shared tables are not compatible with components yet") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
tests/snapshots/local/component-model/shared-everything-threads/not-accepted.wast.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"source_filename": "tests/local/component-model/shared-everything-threads/not-accepted.wast", | ||
"commands": [ | ||
{ | ||
"type": "assert_invalid", | ||
"line": 2, | ||
"filename": "not-accepted.0.wasm", | ||
"module_type": "binary", | ||
"text": "shared linear memories are not compatible with components yet" | ||
}, | ||
{ | ||
"type": "assert_invalid", | ||
"line": 11, | ||
"filename": "not-accepted.1.wasm", | ||
"module_type": "binary", | ||
"text": "shared tables are not compatible with components yet" | ||
} | ||
] | ||
} |