Skip to content

How to validate the ref.func instruction #1759

Answered by rossberg
CharlieTap asked this question in Q&A

You must be logged in to vote

C.refs is initialised here:

C.refs is the set funcidx(module with funcs = ε with start = ε), i.e., the set of function indices occurring in the module, except in its functions or start function.

This is saying that C.refs must only include function indices that occur outside any function. Hence, the latter example fails because the only occurrence of $f is inside a function, while in the other test, $f does also occur in an element segment, so outside a function.

Replies: 1 comment 6 replies

You must be logged in to vote
6 replies
@CharlieTap

@rossberg

Answer selected by CharlieTap
@CharlieTap

@bashor

@tlively

@rossberg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants