This repository was archived by the owner on Nov 3, 2021. It is now read-only.
This repository was archived by the owner on Nov 3, 2021. It is now read-only.
Typeability Bug in Reference Implementation #111
Closed
Description
If I'm reading this code correctly, the reference interpretation incorrectly accepts this invalid instruction sequence:
(unreachable)
(select)
(ref.is_null funcref) ;; specific reference type doesn't matter
The issue is that select
is polymorphic with respect to numeric types only. So while the result type of select
after unreachable
is unknown, it must at least be a numeric type. As such, it cannot be used for any instruction expecting a reference type.
The reference interpreter seems to fail to incorporate this reasoning. Instead of using value_type option
, the reference interpreter seems to need to use an ADT with an additional nullary case that represents only unknown numeric types.
Metadata
Metadata
Assignees
Labels
No labels