Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Wasm: execution sequence of finally and filters is wrong #8283

Open
yowl opened this issue Aug 26, 2020 · 0 comments
Open

Wasm: execution sequence of finally and filters is wrong #8283

yowl opened this issue Aug 26, 2020 · 0 comments

Comments

@yowl
Copy link
Contributor

yowl commented Aug 26, 2020

Wasm exception handling, where filters are in in higher catches, is processing the filters after finallys . This means that this test fails in Wasm: https://stackoverflow.com/questions/57544142/in-c-sharp-try-finally-how-to-catch-the-original-exception/57544409#57544409

This is because Wasm is using a mix of manual handling and leveraging LLVM exceptions. A possible fix could be to store finally blocks (along with the shadow stack pointers) while the filters are evaluated going back up the stack and only execute them once a catch has been found.

Running finally blocks when the exception is not caught anywhere is another case to consider and probably broken currently as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant