Skip to content

Communicate exceptions through global memory #1588

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 1 commit into from
Jun 11, 2019

Conversation

alexcrichton
Copy link
Contributor

Instead of allocating space on the stack and returning a pointer we
should be able to use a single global memory location to communicate
this error payload information. This shouldn't run into any reentrancy
issues since it's only stored just before returning to wasm and it's
always read just after returning from wasm.

Instead of allocating space on the stack and returning a pointer we
should be able to use a single global memory location to communicate
this error payload information. This shouldn't run into any reentrancy
issues since it's only stored just before returning to wasm and it's
always read just after returning from wasm.
@alexcrichton
Copy link
Contributor Author

Note that this is part of the webidl work for #1524 where we ideally want to alter the ABIs of functions as little as possible. This is basically just a small refactoring which I think we want regardless and should make implementing #1524 a bit simpler.

@alexcrichton alexcrichton merged commit c0df37b into rustwasm:master Jun 11, 2019
@alexcrichton alexcrichton deleted the exnptr branch June 11, 2019 19:53
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.

1 participant