Skip to content

Comments

[spec] Fix state for expression evaluation (WIP)#2078

Merged
rossberg merged 11 commits intomainfrom
fix.evalglobals
Feb 24, 2026
Merged

[spec] Fix state for expression evaluation (WIP)#2078
rossberg merged 11 commits intomainfrom
fix.evalglobals

Conversation

@rossberg
Copy link
Member

This fixes an oversight in the evaluation of constant expressions for Wasm 3.0, where allocations can now in fact cause modifications to the store.

This is WIP, the fix currently causes the interpreter to fail. @f52985, can you please take a look?

@f52985
Copy link
Collaborator

f52985 commented Feb 24, 2026

Fixed.

The issue was that the animation pass assumed only the last argument of a relational premise is the output argument.

This assumption held for the previous premise:
-- Eval_expr: z; expr ~>* z; val
where val is the only output.

It no longer holds for the updated premise:
-- Eval_expr: z; expr ~>* z'; val
where the last two arguments (z' and val) are outputs.

The animation pass has been updated to handle this generalized case.

@rossberg rossberg merged commit 6a6876a into main Feb 24, 2026
10 checks passed
@rossberg rossberg deleted the fix.evalglobals branch February 24, 2026 09:06
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