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

Add a stub for _Unwind_RaiseException #4104

Merged
merged 1 commit into from
Apr 29, 2016

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Feb 16, 2016

Just a basic implementation to make Rust happy.
This is the code I used to pass the tests. It's obviously not clean, but it's still better than aborting.

If I have some time I'll try figure out correctly how exceptions handling works in C++ and emscripten and write some correct code.

_Unwind_RaiseException: function(ex) {
abort('Unwind_RaiseException');
Copy link
Member

Choose a reason for hiding this comment

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

could this just call cxa_throw?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably yes, but cxa_throw takes three parameters and I'm not familiar enough with emscripten to know how to extract the relevant values from ex.

Copy link
Member

Choose a reason for hiding this comment

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

seems like you can call cxa_throw(ex, null, null).

@kripken
Copy link
Member

kripken commented Feb 16, 2016

Also need a test for landing.

@tomaka
Copy link
Contributor Author

tomaka commented Feb 17, 2016

Oh I was expecting to get away with it without a test :-/

@kripken
Copy link
Member

kripken commented Feb 17, 2016

Sorry, yeah, we do need tests for stuff like this, or else we have no guarantee it won't break.

Let me know if you need any help writing one.

@kripken kripken merged commit e94ca36 into emscripten-core:incoming Apr 29, 2016
@kripken
Copy link
Member

kripken commented Apr 29, 2016

Might as well add a test later when things are further along. Merged.

@tomaka tomaka deleted the unwind-raise branch April 29, 2016 18:39
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