Skip to content

Fix GUFA on calls to function refs in open world #7135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 4, 2024

Conversation

kripken
Copy link
Member

@kripken kripken commented Dec 4, 2024

In open world we must assume that a funcref that escapes to the outside
might be called.

@kripken kripken requested a review from tlively December 4, 2024 19:10
@kripken kripken merged commit 47f9a78 into WebAssembly:main Dec 4, 2024
13 checks passed
@kripken kripken deleted the gufa-closed-open branch December 4, 2024 20:47
CountBleck added a commit to CountBleck/assemblyscript that referenced this pull request Jun 1, 2025
Some new features are being added, although only relaxed SIMD is in a
usable state. stringref has been almost obliterated, and only
functionality compatible with JS string builtins is being kept.

Binaryen also seems to be generating more nops and blocks than usual.
Also, due to WebAssembly/binaryen#7135, dead arguments aren't being
eliminated when a function reference is made (ref.func), which affects
the optimized output of call-optional, function-call, and other tests.
CountBleck added a commit to CountBleck/assemblyscript that referenced this pull request Jun 1, 2025
Some new features are being added, although only relaxed SIMD is in a
usable state. stringref has been almost obliterated, and only
functionality compatible with JS string builtins is being kept.

Binaryen also seems to be generating more nops and blocks than usual.
Also, due to WebAssembly/binaryen#7135, dead arguments aren't being
eliminated when a function reference is made (ref.func), which affects
the optimized output of call-optional, function-call, and other tests.
CountBleck added a commit to CountBleck/assemblyscript that referenced this pull request Jun 1, 2025
Some new features are being added, although only relaxed SIMD is in a
usable state. stringref has been almost obliterated, and only
functionality compatible with JS string builtins is being kept.

Binaryen also seems to be generating more nops and blocks than usual.
Also, due to WebAssembly/binaryen#7135, dead arguments aren't being
eliminated when a function reference is made (ref.func), which affects
the optimized output of call-optional, function-call, and other tests.
CountBleck added a commit to CountBleck/assemblyscript that referenced this pull request Jun 3, 2025
Due to WebAssembly/binaryen#7135, any function reference is treated as
potentially leaked to the outside world, unless the module is marked as
closed-world. This prevents DAE from taking place. To fix this, mark
the module as closed-world when tables are neither imported nor exported
and when exports do not return/contain funcrefs.
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