Skip to content
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

Panics caller on exit error #673

Merged
merged 4 commits into from
Jul 6, 2022
Merged

Panics caller on exit error #673

merged 4 commits into from
Jul 6, 2022

Conversation

codefromthecrypt
Copy link
Contributor

This changes the AssemblyScript abort handler and WASI proc_exit
implementation to panic the caller which eventually invoked close.

This ensures no code executes afterwards, For example, LLVM inserts
unreachable instructions after calls to exit.

See emscripten-core/emscripten#12322
See #601

@codefromthecrypt
Copy link
Contributor Author

need to backfill some unit tests so that we don't have this happen again.

@codefromthecrypt
Copy link
Contributor Author

next step: test wasi with rust to verify the exit code zero thing.. then polish (a couple missing tests and RATIONALE)

@codefromthecrypt codefromthecrypt marked this pull request as ready for review July 6, 2022 07:26
@codefromthecrypt
Copy link
Contributor Author

ok leaving out a rust variant of wasi as it is massive and uses wasi-libc which the other example in this PR already does.

rust-lang/rust#73432

RATIONALE.md Outdated Show resolved Hide resolved
This changes the AssemblyScript abort handler and WASI proc_exit
implementation to panic the caller which eventually invoked close.

This ensures no code executes afterwards, For example, LLVM inserts
unreachable instructions after calls to exit.

See emscripten-core/emscripten#12322
See #601

Signed-off-by: Adrian Cole <[email protected]>
Signed-off-by: Adrian Cole <[email protected]>
RATIONALE.md Outdated Show resolved Hide resolved
codefromthecrypt and others added 2 commits July 6, 2022 15:39
Signed-off-by: Adrian Cole <[email protected]>
@codefromthecrypt codefromthecrypt merged commit 8c2f092 into main Jul 6, 2022
@codefromthecrypt codefromthecrypt deleted the panic-on-close branch July 6, 2022 08:30
@codefromthecrypt
Copy link
Contributor Author

thanks for the help @anuraaga!

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