summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2020-05-11 22:09:38 -0700
committerGitHub <noreply@github.com>2020-05-11 22:09:38 -0700
commit28af34277a9ebc1a91f51dfb51b267bbea073dab (patch)
tree13719903036f9999e2bdeca4df5668cdd1c57aec /src
parentfad5a2dbdba5d98a91c4a2dea24bbff3b565e733 (diff)
downloadwabt-28af34277a9ebc1a91f51dfb51b267bbea073dab.tar.gz
wabt-28af34277a9ebc1a91f51dfb51b267bbea073dab.tar.bz2
wabt-28af34277a9ebc1a91f51dfb51b267bbea073dab.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/binary-reader-ir.cc2
1 files changed, 0 insertions, 2 deletions
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<CallIndirectExpr>();
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<ReturnCallIndirectExpr>();
SetFuncDeclaration(&expr->decl, Var(sig_index, GetLocation()));
expr->table = Var(table_index);