Skip to content

Conversation

@stevenfontanella
Copy link
Member

@stevenfontanella stevenfontanella commented Feb 10, 2026

Fix for fuzzer-detected crash when ctor-eval runs on a module that imports a tag. Prior to #8254, ctor-eval would crash when an imported tag was evaluated, but not when imported. Change the code to allow imported tags even during evaluation.

Note that we can't reason about the identity of imported tags. In the following code, $t1 and $t2 may be the same or different tags:

(import "foo" "bar" (tag $t1))
(import "foo" "bar2" (tag $t2))

In this PR, we assume that $t1 and $t2 are different tags, and that they're the same tag if the import name is the same (this is also not true in general, the hosting environment may provide two different values for the same exact import name). This may cause some correctness issues. As a followup, we can make equality comparison of two imported tags throw FailToEvalException to make evaluation correct.

Part of #8180.

@stevenfontanella stevenfontanella marked this pull request as ready for review February 10, 2026 22:28
@stevenfontanella
Copy link
Member Author

Ran the fuzzer for ~30 minutes with no errors.

@stevenfontanella stevenfontanella merged commit 1dd0e24 into main Feb 10, 2026
17 checks passed
@stevenfontanella stevenfontanella deleted the ctor-crash branch February 10, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants