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 support for EXC_GUARD #47

Merged
merged 12 commits into from
Jul 21, 2022
Merged

Add support for EXC_GUARD #47

merged 12 commits into from
Jul 21, 2022

Conversation

Jake-Shadle
Copy link
Member

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

Adds the EXC_GUARD mask so that those exceptions can now be caught in crash-handler. This includes adding support for rasing EXC_GUARD exceptions from sadness generator.

While testing the minidumps generated from an EXC_GUARD I found out that crash-handler was accidentally truncating the code and subcode of the exceptions since I had forgotten packed(4) on the structure that receives the exception details from the mach exception port, basically causing all of the minidumps created from a crash-context captured by the crash-handler to be missing information. Fixing that by looking at the code generated for mig mach_exc.defs made me also realize why the mach IPC stuff in crash-context was "weird". When receiving messages, one needs to always account for the "trailer" placed at the end by the kernel, so now that code is cleaner as well.

Also improved documentation by linking directly to the xnu sources in github.

Resolves: #34

@Jake-Shadle Jake-Shadle merged commit 1514047 into main Jul 21, 2022
@Jake-Shadle Jake-Shadle deleted the macos/exc-guard branch July 21, 2022 10:55
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.

Handle EXC_GUARD exceptions on macOS
1 participant