mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:57:35 +00:00
Kernel: Set "pledge_violation" coredump metadata in REQUIRE_PROMISE()
Similar to LibC storing an assertion message before aborting, process death by pledge violation now sets a "pledge_violation" key with the respective pledge name as value in its coredump metadata, which the CrashReporter will then show.
This commit is contained in:
parent
7e5c49b755
commit
678919e9c1
2 changed files with 6 additions and 0 deletions
|
@ -57,6 +57,8 @@ struct [[gnu::packed]] ProcessInfo {
|
|||
// - "pid" (int)
|
||||
// - "termination_signal" (u8)
|
||||
// - "executable_path" (String)
|
||||
// - "arguments" (Vector<String>)
|
||||
// - "environment" (Vector<String>)
|
||||
char json_data[]; // Null terminated
|
||||
};
|
||||
|
||||
|
@ -91,6 +93,7 @@ struct [[gnu::packed]] Metadata {
|
|||
//
|
||||
// Well-known keys:
|
||||
// - "assertion": Used by LibC's __assertion_failed() to store assertion info
|
||||
// - "pledge_violation": Used by the Kernel's REQUIRE_PROMISE() to store pledge violation info
|
||||
char json_data[]; // Null terminated
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue