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 inital MacOS implementation #17

Merged
merged 29 commits into from
Apr 21, 2022
Merged

Add inital MacOS implementation #17

merged 29 commits into from
Apr 21, 2022

Conversation

Jake-Shadle
Copy link
Member

@Jake-Shadle Jake-Shadle commented Apr 21, 2022

This adds the initial MacOS implementation for crash-context, exception-handler, and minidumper. This PR heavily depends on rust-minidump/minidump-writer#21 for the minidump write implementation.

Other notable changes:

  • Adds a CrashEventResult type returned from the user callback registered with the exception handler, which can either be Handled(bool) covering the previous use case, but can also be a Jump specifying a jump buffer and value. This allows the exception handler to cleanly cleanup its state (eg unlock mutexes) before long jumping to the specified location. This functionality was only used in testing before, but there's no reason it can't be part of the user API in cases where users know they are about to raise an exception and want to be able to handle it gracefully....except for MacOS! Since MacOS delivers exceptions to a separate thread, we can't longjump from it back to the point in the user thread that raised the exception, at least, not in a way that I know of.

Resolves: #3

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.

Add Mac support
2 participants