mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-15 05:52:19 +00:00
LibWasm: Reject indirect calls to external function references
This fixes a test in the WebAssembly spec test suite that was
added in 924c1f816d
This commit is contained in:
parent
c4f7361a5b
commit
a3157c8c69
Notes:
github-actions[bot]
2024-10-15 00:15:08 +00:00
Author: https://github.com/ADKaster
Commit: a3157c8c69
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1803
1 changed files with 2 additions and 2 deletions
|
@ -2109,8 +2109,8 @@ VALIDATE_INSTRUCTION(call_indirect)
|
|||
TRY(validate(args.type));
|
||||
|
||||
auto& table = m_context.tables[args.table.value()];
|
||||
if (!table.element_type().is_reference())
|
||||
return Errors::invalid("table element type for call.indirect"sv, "a reference type"sv, table.element_type());
|
||||
if (table.element_type().kind() != ValueType::FunctionReference)
|
||||
return Errors::invalid("table element type for call.indirect"sv, "a function reference"sv, table.element_type());
|
||||
|
||||
auto& type = m_context.types[args.type.value()];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue