-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NativeAOT createdump fork/exec for crash dump generation (#89203)
* NativeAOT createdump fork/exec for crash dump generation Port the .NET Core createdump fork/exec code to NativeAOT. Add src/native/inc/generatedumpflags.h. Remove dup definitions of this enum. Move and port clrconfignocache.h from src/coreclr/inc to src/native/inc/. * Add building more command line arguments for signal number, etc. Fix some build problems. * Code review feedback - use RhConfig instead of clrconfignocache.h * Fix string buffer length * Fix nativeaot test failures. Added crash buffer address to debug header contract * Generate a core dump on unhandled SIGSEGV/SIGFPE Add PalCreateDump.h with all the public functions. * Build and pass an EXCEPTION_RECORD for Linux like it was done for Windows. The next step is to pass the address of it to createdump. * Pass exception record address to createdump * Add special diagnostic info memory region Contains the exception record address for Native AOT crashes.
- Loading branch information
Showing
31 changed files
with
896 additions
and
117 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
// ****************************************************************************** | ||
// WARNING!!!: This code is also used by SOS in the diagnostics repo. Should be | ||
// updated in a backwards and forwards compatible way. | ||
// See: https://github.com/dotnet/diagnostics/blob/main/src/SOS/inc/specialdiaginfo.h | ||
// ****************************************************************************** | ||
|
||
// This is a special memory region added to ELF and MachO dumps that contains extra diagnostics | ||
// information like the exception record for a crash for a NativeAOT app. The exception record | ||
// contains the pointer to the JSON formatted crash info. | ||
|
||
#define SPECIAL_DIAGINFO_SIGNATURE "DIAGINFOHEADER" | ||
#define SPECIAL_DIAGINFO_VERSION 1 | ||
|
||
#ifdef __APPLE__ | ||
const uint64_t SpecialDiagInfoAddress = 0x7fffffff10000000; | ||
#else | ||
#if TARGET_64BIT | ||
const uint64_t SpecialDiagInfoAddress = 0x00007ffffff10000; | ||
#else | ||
const uint64_t SpecialDiagInfoAddress = 0x7fff1000; | ||
#endif | ||
#endif | ||
|
||
struct SpecialDiagInfoHeader | ||
{ | ||
char Signature[16]; | ||
int32_t Version; | ||
uint64_t ExceptionRecordAddress; | ||
}; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.