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

Handle panics by unwinding the stack and implement check_event method #282

Merged
merged 2 commits into from
Sep 7, 2021

Conversation

GabrielMajeri
Copy link
Collaborator

@GabrielMajeri GabrielMajeri commented Sep 7, 2021

The default panic mechanism was changed to abort in 58a623a, to avoid issues with event callbacks. However, as far as I can tell, since rust-lang/rust#76570, unwinding is automatically disabled for extern "efiapi" functions, so there shouldn't be any issue with using panic = unwind by default.

I've implemented the check_event method and added a new test for creating a custom event, and after playing around a bit, there seemed to be no issues with panics inside the notify function.

@GabrielMajeri GabrielMajeri changed the title Handle panics by unwinding the stack Handle panics by unwinding the stack and implement check_event method Sep 7, 2021
@nicholasbishop nicholasbishop merged commit 1b55908 into master Sep 7, 2021
@GabrielMajeri GabrielMajeri deleted the panic-unwind branch September 7, 2021 18:13
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