From 9d6413cd2d504684d026bdec27e2d030d4c60598 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 12 Oct 2020 14:48:41 -0700 Subject: Slightly improve validator error text on segments (#3215) Mentioning if it's a memory or a table segment is convenient. --- src/wasm/wasm-validator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wasm/wasm-validator.cpp') 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()) { Index start = segment.offset->cast()->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"); -- cgit v1.2.3