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 abort handling #63

Merged
merged 6 commits into from
Nov 17, 2022
Merged

Add abort handling #63

merged 6 commits into from
Nov 17, 2022

Conversation

Jake-Shadle
Copy link
Member

Follow up of #62.

Support handling of SIGABRT on windows. While this is not generally useful in rust, due to std::process::abort using the fastfail mechanism which bypasses exception handling and signal emission, it is useful when there is C/C++ code involved, as, for example, assert will call abort.

This also replaces the windows-sys dependency in minidumper with winapi as window-sys version churn has been incredibly annoying to deal with, and most projects still have winapi dependencies through other crates. This is probably temporary and we'll just write the bindings we need manually later since they aren't publicly exposed so there is no need to interoperate with other crates.

This also changes it so that sadness-generator now does libc::abort instead of std::process::abort so that all the platforms the crates in this repo support have the same signal based abort testing.

@Jake-Shadle Jake-Shadle merged commit 7b8700d into main Nov 17, 2022
@Jake-Shadle Jake-Shadle deleted the windows-add-abort branch November 17, 2022 14:28
@kennykerr
Copy link

This also replaces the windows-sys dependency in minidumper with winapi as window-sys version churn has been incredibly annoying to deal with

I'm curious about what has been so annoying. Are your perhaps confusing windows with windows-sys? The windows-sys crate has only had 2 releases in the last 9 months. The last version has been out for 4 months.

The last version of the windows crate has been out for 3 months. Both are only published upon request.

@Jake-Shadle
Copy link
Member Author

windows-sys has definitely been less annoying than windows, but just the latest 2 versions are represented almost equally in our main project because some crates keep updated but many got burnt out in the earlier version churn and just stuck with 0.36.1 even though it has been out for 9 months, so removing windows-sys means we at least won't contribute (other than the transitive use via parking_lot that I plan on fixing at some point, as it already includes handwritten bindings to some Nt* functions that aren't exposed via windows-sys) to having duplicate versions in a project's crate graph when the inevitable next minor version bump comes.

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