From 28af34277a9ebc1a91f51dfb51b267bbea073dab Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Mon, 11 May 2020 22:09:38 -0700 Subject: Remove range assertions in BinaryReader (#1416) These assertions check to see whether the `sig_index` (i.e. the function type) are in bounds. But this is the responsibility of the validator, not the binary reader. Fixes issues #1413 and #1414. --- src/binary-reader-ir.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/binary-reader-ir.cc b/src/binary-reader-ir.cc index d0c5a48b..e1bac665 100644 --- a/src/binary-reader-ir.cc +++ b/src/binary-reader-ir.cc @@ -722,7 +722,6 @@ Result BinaryReaderIR::OnCallExpr(Index func_index) { } Result BinaryReaderIR::OnCallIndirectExpr(Index sig_index, Index table_index) { - assert(sig_index < module_->types.size()); auto expr = MakeUnique(); SetFuncDeclaration(&expr->decl, Var(sig_index, GetLocation())); expr->table = Var(table_index); @@ -734,7 +733,6 @@ Result BinaryReaderIR::OnReturnCallExpr(Index func_index) { } Result BinaryReaderIR::OnReturnCallIndirectExpr(Index sig_index, Index table_index) { - assert(sig_index < module_->types.size()); auto expr = MakeUnique(); SetFuncDeclaration(&expr->decl, Var(sig_index, GetLocation())); expr->table = Var(table_index); -- cgit v1.2.3