diff options
author | Thomas Lively <tlively@google.com> | 2024-09-19 17:08:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-19 17:08:17 -0700 |
commit | 480f5ba352a9f89afe72779c81f8a16fd3c8ba4a (patch) | |
tree | 55eae60ae748233aa244a7afda693ca6b1927455 /test/lit/binary/bad-datacount.test | |
parent | 2711d4fe4b4514ea146e8810959a8f170c932591 (diff) | |
download | binaryen-480f5ba352a9f89afe72779c81f8a16fd3c8ba4a.tar.gz binaryen-480f5ba352a9f89afe72779c81f8a16fd3c8ba4a.tar.bz2 binaryen-480f5ba352a9f89afe72779c81f8a16fd3c8ba4a.zip |
[NFC] Eagerly create segments when parsing datacount (#6958)
The purpose of the datacount section is to pre-declare how many data
segments there will be so that engines can allocate space for them
and not have to back patch subsequent instructions in the code section
that refer to them. Once we use IRBuilder in the binary parser, we will
have to have the data segments available by the time we parse
instructions that use them, so eagerly construct the data segments when
parsing the datacount section.
Diffstat (limited to 'test/lit/binary/bad-datacount.test')
-rw-r--r-- | test/lit/binary/bad-datacount.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lit/binary/bad-datacount.test b/test/lit/binary/bad-datacount.test new file mode 100644 index 000000000..27e0c72a3 --- /dev/null +++ b/test/lit/binary/bad-datacount.test @@ -0,0 +1,9 @@ +RUN: not wasm-opt --debug %s.wasm 2>&1 | filecheck %s + +;; Check that we get the expected error. + +;; CHECK: data count and data sections disagree on size + +;; Check that we print out the module rather than hitting an assertion error. + +;; CHECK: (module |