diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-validator.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 5e58ab408..0c3acaf6d 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -176,6 +176,7 @@ public: } } void visitCallIndirect(CallIndirect *curr) { + shouldBeTrue(getModule()->table.segments.size() > 0, curr, "no table"); auto* type = getModule()->checkFunctionType(curr->fullType); if (!shouldBeTrue(!!type, curr, "call_indirect type must exist")) return; shouldBeEqualOrFirstIsUnreachable(curr->target->type, i32, curr, "indirect call target must be an i32"); |