diff options
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r-- | src/wasm/wasm-validator.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 44ecbe9c9..cb3841197 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -3208,9 +3208,11 @@ static void validateDataSegments(Module& module, ValidationInfo& info) { "passive segment should not have an offset"); } else { auto memory = module.getMemoryOrNull(segment->memory); - info.shouldBeTrue(memory != nullptr, - "segment", - "active segment must have a valid memory name"); + if (!info.shouldBeTrue(memory != nullptr, + "segment", + "active segment must have a valid memory name")) { + continue; + } if (memory->is64()) { if (!info.shouldBeEqual(segment->offset->type, Type(Type::i64), |