Skip to content

Conversation

@tlively
Copy link
Member

@tlively tlively commented Oct 8, 2025

Update the Literal constructors for funcrefs to take Type instead of
HeapType to allow them to be given inexact function references types
when the referenced function is an import. Use the new capability to
give references to imported functions inexact types in GUFA. Add a test
where this change fixes a misoptimization as well as tests where this
change simply changes the nature of the misoptimization. Future PRs will
fix these tests.

Update the Literal constructors for funcrefs to take Type instead of
HeapType to allow them to be given inexact function references types
when the referenced function is an import. Use the new capability to
give references to imported functions inexact types in GUFA. Add a test
where this change fixes a misoptimization as well as tests where this
change simply changes the nature of the misoptimization. Future PRs will
fix these tests.
@tlively tlively requested a review from kripken October 8, 2025 20:48
@tlively
Copy link
Member Author

tlively commented Oct 8, 2025

Will hold out on landing this until follow-ons are ready because --fuzz-exec is unhappy with the GUFA changes without corresponding interpreter changes.

@kripken
Copy link
Member

kripken commented Oct 22, 2025

I'll look into possibly landing this, if it helps fuzzing V8 in the medium term.

@tlively
Copy link
Member Author

tlively commented Oct 22, 2025

Meanwhile I've just uploaded the proposed fix upstream in the proposal repo: WebAssembly/custom-descriptors#72

@kripken
Copy link
Member

kripken commented Oct 23, 2025

I experimented here:

https://github.com/WebAssembly/binaryen/compare/main...kripken:binaryen:import.func.type?expand=1

That has most of the changes to make imported functions inexact, including literals and otherwise. A bunch remains, though - wasm-split, some C API questions, possibly more. Overall it is a bunch of work, and I'm not sure it's worth doing just for the short-term, if we and V8 are going to update to the final spec later anyhow.

That branch might be useful as a list of relevant places that the final spec update will need to modify (but differently).

@kripken
Copy link
Member

kripken commented Oct 24, 2025

I found a way to simplify the C/JS API issue, and also realized this is more urgent than I thought - we are probably missing quite a lot of fuzzer coverage atm, being out of sync with V8 - so I finished this up: #7993

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.

3 participants