Skip to content

[Stack Switching] wasm-ctor-eval: Do not try to serialize continuations#7877

Merged
kripken merged 9 commits intoWebAssembly:mainfrom
kripken:ctor.nonser
Sep 3, 2025
Merged

[Stack Switching] wasm-ctor-eval: Do not try to serialize continuations#7877
kripken merged 9 commits intoWebAssembly:mainfrom
kripken:ctor.nonser

Conversation

@kripken
Copy link
Copy Markdown
Member

@kripken kripken commented Sep 3, 2025

They cannot be serialized.

This requires us to be able to "give up" when any serialization fails, adding
various code paths for that.

@kripken kripken requested a review from tlively September 3, 2025 17:39
Comment thread test/lit/ctor-eval/cont-noserial.wast Outdated
Comment thread test/lit/ctor-eval/cont-noserial.wast
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.

It would be good to test the non-serializable defining global, parameter, and local separately.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added specific tests.

Comment thread test/lit/ctor-eval/cont-noserial.wast Outdated
Co-authored-by: Thomas Lively <tlively123@gmail.com>
@kripken kripken merged commit 63860fb into WebAssembly:main Sep 3, 2025
16 checks passed
@kripken kripken deleted the ctor.nonser branch September 3, 2025 21:02
kripken added a commit that referenced this pull request Sep 5, 2025
…ization errors in results (#7883)

#7877 gave up when we couldn't serialize things, in various situations. But
one of the cases, when we can't serialize the results, we checked AFTER we
already "commit" the changes to the module. That is, we need to check for
errors and stop if we find any, and only then apply execution results to the
module, and we added a check that was after the application.

To fix this, we need to be careful and know that if we will care about the
serialization of the results then we cannot execute continuations, as they
may end up needing to be serialized. Doing anything more precise would
be significantly more complex.
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