summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-10-12 14:48:41 -0700
committerGitHub <noreply@github.com>2020-10-12 14:48:41 -0700
commit9d6413cd2d504684d026bdec27e2d030d4c60598 (patch)
treef4d8a5e5834e867ea13c6eff3c1367928cca0c2f /src
parent65a4e05b75e714268f6b7aaf33e0f97ad7a635c1 (diff)
downloadbinaryen-9d6413cd2d504684d026bdec27e2d030d4c60598.tar.gz
binaryen-9d6413cd2d504684d026bdec27e2d030d4c60598.tar.bz2
binaryen-9d6413cd2d504684d026bdec27e2d030d4c60598.zip
Slightly improve validator error text on segments (#3215)
Mentioning if it's a memory or a table segment is convenient.
Diffstat (limited to 'src')
-rw-r--r--src/wasm/wasm-validator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 644358c04..012cb0e36 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -2560,7 +2560,7 @@ static void validateMemory(Module& module, ValidationInfo& info) {
segment.data.size(),
curr.initial * Memory::kPageSize),
segment.offset,
- "segment offset should be reasonable");
+ "memory segment offset should be reasonable");
if (segment.offset->is<Const>()) {
Index start = segment.offset->cast<Const>()->value.geti32();
Index end = start + size;
@@ -2592,7 +2592,7 @@ static void validateTable(Module& module, ValidationInfo& info) {
segment.data.size(),
module.table.initial * Table::kPageSize),
segment.offset,
- "segment offset should be reasonable");
+ "table segment offset should be reasonable");
for (auto name : segment.data) {
info.shouldBeTrue(
module.getFunctionOrNull(name), name, "segment name should be valid");