Skip to content

[spec] Preserve host function arguments on divergence - #2231

Open
sanguineman wants to merge 1 commit into
WebAssembly:mainfrom
sanguineman:fix/hostfunc-div-preserve-args
Open

[spec] Preserve host function arguments on divergence#2231
sanguineman wants to merge 1 commit into
WebAssembly:mainfrom
sanguineman:fix/hostfunc-div-preserve-args

Conversation

@sanguineman

@sanguineman sanguineman commented Aug 24, 2026

Copy link
Copy Markdown

Summary

Previously, the reduction rule for host function divergence dropped the call arguments val^n from the resulting configuration.

스크린샷 2026-08-24 오후 1 30 08

According to the WebAssembly specificaiton, the post-conditions for executing host functions must match those in the execution rule for invoking host functions. However, a host function that takes one or more arguments, one reduction step by Step/call_ref-hostfunc-div removes val^n and leaves only (REF.FUNC_ADDR a) (CALL_REF yy). Neither host-function execution rule can then apply because the required operands are missing.

Fix

The updated rule preserves the complete configuration, making the divergence case as exact self-loop as intended.

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.

1 participant