Skip to content

feat: reenable weval patches#303

Merged
andreiltd merged 10 commits intobytecodealliance:mainfrom
andreiltd:revive-weval
Mar 4, 2026
Merged

feat: reenable weval patches#303
andreiltd merged 10 commits intobytecodealliance:mainfrom
andreiltd:revive-weval

Conversation

@andreiltd
Copy link
Member

@andreiltd andreiltd commented Feb 19, 2026

This an attempt to re-apply weval patches on top of FF140 to test weval failures. Because we don't have prebuilt image for wevaled spidermonkey the build system will build spidermonkey from source.

The firefox has been updated to the latest stable: 147_0_4

There is a notable change in loading module API in ff147: new API is async-capable ModuleLoadHook returns bool and must call FinishLoadingImportedModule on success.

Depends on bytecodealliance/firefox#1

@andreiltd andreiltd marked this pull request as draft February 19, 2026 10:16
@andreiltd andreiltd force-pushed the revive-weval branch 2 times, most recently from 1ccf3a7 to 1dd56b5 Compare February 20, 2026 10:01
The wasi spce doesn't really say anything about the order of ready
handles, it only says that he result list<u32> contains one or more
indices of handles in the argument list that is ready for I/O. We should
find the oldest task.

This was working previously because wasmtime v29 was using HashMap for
iterating pollables for which the iteration order was random and just
happened to work. Recent version of wasmtime changes that to use
BTreeMap instead which broke the assumptions here.
Most of the fixes are mechanical:
- changing c style enums to enum classes and then using
std::to_underlying to convert to numeric types
- replacing printf with std::println
- fixing stack address escape in builtin.h file: returning &self in the
tuple gives the caller a dangling pointer, but the pointer where never
actually used.
Copy link
Member

@tschneidereit tschneidereit left a comment

Choose a reason for hiding this comment

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

Looks great, with the couple of comments addressed!

@andreiltd andreiltd changed the title chore: reenable weval patches feat: reenable weval patches Mar 3, 2026
@andreiltd andreiltd marked this pull request as ready for review March 3, 2026 16:36
@andreiltd andreiltd merged commit 643aa45 into bytecodealliance:main Mar 4, 2026
7 checks passed
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.

4 participants