Closed
Conversation
There was a _ton_ of duplication of minidump types between this crate and minidump-common, so this refactors the code to remove basically all types that minidump-common already had, and changed the minidump_writer code to use scroll pwrite instead of relying on repr(C) and byte transmutes
Collaborator
|
Urgh, I messed up my tabs and posted my original answer to the wrong PR. Here it is: From a first 'quick' glance, I can say that its.... long :D Apart from that:
Let's pick this up on Monday again and have a great weekend! |
Collaborator
Author
|
Yah, again, sorry about that, I'll split it out into smaller PRs that are easier to review/digest.
|
Merged
Collaborator
|
Thanks for your work! I guess we can close this one now? |
Collaborator
Author
|
Yup! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm opening this as a draft as my intention is to split this into multiple PRs tomorrow, I just wanted to post this to get any initial feedback and just generally spread awareness.
A little background, I had started doing my own reimplementation of Breakpad's signal handling and minidump writing before I was made aware that this crate existed, so I kind of stopped on the minidump writing part and folded this project into the code I had (see the PR EmbarkStudios/crash-handling#1), so most of the changes came about from using this crate in production code already, as it allows us to catch crashes when targeting musl, which was tedious due to all of the Breakpad C++ code.
The high level changes are basically:
crash_context::CrashContextstructure which allows the crash context to be easily shared between multiple crates, as one of the goals of this crate and the general effort around it with mozilla/sentry was to de-monolith the old breakpad structure.crash_contextdefines its ownucontext_tand friends rather than relying on libc's, as well as its owngetcontext, as libc's has some rather unfortunate differences between libc implementations, most notably formuslas eg.getcontexthas been deprecated for decades and has no replacement, but...is still useful for testing. Sincemuslwas my primary target initially, all this code means that this crate now works formusl, resolving Doesn't build on x86_64 musl #4.scroll::Pwritederives for all of the relevant structures that this crates writes. rust-minidump/rust-minidump@d7a5a24minidump-writeras I want to add Windows support next, and I assume Mac support as well will come, so having the crate named minidump_writer_linux felt too specific.#cfgusage withcfg_ifas it reduces messy boilerplate and makes things easier to read.Things I probably shouldn't have changed:
mod.rsfiles that made the codebase annoying to navigateThings I broke:
I haven't been compiling or testing on anything except x86/_64 so none of the arm/aarch64/mips code paths even compile right now, but I hope to address those tomorrow, or in follow up PRs.