Skip to content

Commit 79e6081

Browse files
committed
Test: Make sure global section validation fails correctly
The file incompatible_init_desc_type.wasm is based on the file testsuite/globals.wasm and has the first global declaration in the global section edited to change the global description type from 0x7f to 0x7e, thus making it incompatible with the type returned from the instantiation-time initializer.
1 parent 3da6dc9 commit 79e6081

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

test/sectionvalidation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ def section_validation_fail(directory):
3737
if "type" in directory:
3838
if not interpreter.TypeSection():
3939
sys.exit(1)
40+
if "global" in directory:
41+
if not interpreter.GlobalSection():
42+
sys.exit(1)
4043
sys.exit()
4144
# the parent process
4245
elif pid > 0:

test/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def Legacy(self):
8888
#section_validation_fail(fail_dir + "function")
8989
#section_validation_fail(fail_dir + "table")
9090
#section_validation_fail(fail_dir + "memory")
91-
#section_validation_fail(fail_dir + "global")
91+
section_validation_fail(fail_dir + "global")
9292
#section_validation_fail(fail_dir + "export")
9393
#section_validation_fail(fail_dir + "start")
9494
#section_validation_fail(fail_dir + "element")
359 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)