-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Windows createdump support #35381
Windows createdump support #35381
Conversation
Build a Windows version of createdump that uses MiniDumpWriteDump. Launch that createdump from the runtime when the runtime abort because of an unhandled exception. Hook up the diagnostic server dump message on Windows. Add CrashDumpAndTerminateProcess function that generates a dump if enabled and terminates the process. Replaced varous TerminateProcess calls in the runtime with this new function.
Tagging subscribers to this area: @tommcdon |
Does this change also package/ship createdump with the shared runtime? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks Mike!
I'm a little suspicious that we're going to find cases over time where the error conditions that trigger Linux dumps will be different from the error conditions that trigger Windows dumps given how different the error handling paths are. Nothing obvious jumped out though.
Yes, it will be included in the runtime package shipped as part of the shared runtime like the Linux version is. |
Issue: #34915 |
Hello @mikem8361! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
{ | ||
exitCode = -1; | ||
} | ||
case MiniDumpWithPrivateReadWriteMemory: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the values assigned above, can these cases even be reached? It seems the assigned type is always combination of several flags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right, the minidumpType switch should be masked with the bit in the case statements. I'll try to get that fixes in a future PR.
Build a Windows version of createdump that uses MiniDumpWriteDump.
Launch that createdump from the runtime when the runtime abort because of an unhandled exception.
Hook up the diagnostic server dump message on Windows.
Add CrashDumpAndTerminateProcess function that generates a dump if enabled and terminates
the process. Replaced varous TerminateProcess calls in the runtime with this new function.