Skip to content

wasm2js: Support elem.drop - #9224

Merged
tlively merged 1 commit into
mainfrom
wasm2js-elem-drop
Oct 7, 2026
Merged

tlively merged 1 commit into
mainfrom
wasm2js-elem-drop

Conversation

@tlively

@tlively tlively commented Oct 7, 2026

Copy link
Copy Markdown
Member

In wasm2js, element segments are statically initialized into
FUNCTION_TABLE at module startup, and table.init is not supported,
so elem.drop has no observable effect and can be treated as a no-op.

In wasm2js, element segments are statically initialized into
FUNCTION_TABLE at module startup, and table.init is not supported,
so elem.drop has no observable effect and can be treated as a no-op.
@tlively
tlively requested a review from a team as a code owner October 7, 2026 00:10
@tlively
tlively requested review from kripken and removed request for a team October 7, 2026 00:10
@kripken

kripken commented Oct 7, 2026

Copy link
Copy Markdown
Member

Is there a reason to support this? In general we have not been adding new feature support to wasm2js.

@tlively

tlively commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

#9201 makes the fuzzer emit elem.drop and starts hitting this WASM_UNREACHABLE. I guess we generally support running wasm2js when bulk-memory is enabled, so it's better to add this missing support than to disable wasm2js on bulk-memory and regress our coverage.

@kripken kripken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks, sgtm as a simple fuzzer workaround.

@tlively
tlively merged commit fcf7932 into main Oct 7, 2026
16 checks passed
@tlively
tlively deleted the wasm2js-elem-drop branch October 7, 2026 23:31
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