Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/interp/binary-reader-interp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,9 @@ Result BinaryReaderInterp::OnReturnCallExpr(Index func_index) {
CHECK_RESULT(
validator_.OnReturnCall(GetLocation(), Var(func_index, GetLocation())));

if (func_index >= func_types_.size()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would hope that the validation would fail 2 lines above if func_index was out of range, no?

i.e. this seems like a validation error that should be handled elsewhere.

if you want to continue with this PR please add a failing test case.

return Result::Error;
}
FuncType& func_type = func_types_[func_index];

Index drop_count, keep_count, catch_drop_count;
Expand Down
Loading