Skip to content

Issue in looking up event indices in throw instruction validation #153

Closed
@takikawa

Description

@takikawa

I think there is a small bug in validating throw in cases like the following:

(assert_invalid
  (module
    (type (func))     ;; func type at index 0
    (func throw 0))   ;; event at index 0, which is missing
  "throw index out of bounds")

I believe this should be invalid, because the throw argument index should index into the events vector of the module, but it's looking up in the function types vector instead. Currently it doesn't throw an error.

(I can submit a PR to fix this, though maybe I should wait to see if there are thoughts on PR #152 first as it affects catch in that PR too)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions