Crash reports: the game's own fatal crashes come with the memory their stacks point at

Most crashes are caught by the game's own fatal handlers, which write a
dump of thread stacks only; the launcher could only copy it after the
game had exited. A crash on a freed or overwritten object then showed
the faulting registers but not the object or the list it came from.

- game_fatal_dump: the game's MiniDumpWriteDump import points at
  ReSkate. Before the game writes its dump, the crash reporter takes its
  own of the still-running game for the faulting thread; the game's dump
  follows as before. Reports say capture.source "game-fatal-handler".
- The reporter's dumps include the memory the stacks point at
  (MiniDumpWithIndirectlyReferencedMemory), a few MB more a report.
- The shared report says who asked for the dump (protocol version 4).
- Tests: a game-handler crash is captured with a heap block only its
  stack points at; ReSkate's own capture keeps it too.
This commit is contained in:
AyeZeeBB committed 2026-10-15 20:01:55 -05:00
1 parent ea3f081367
commit 3249f747dc
10 files changed
+169 -18

No files matched your search

+4
View File
@@ -9,6 +9,7 @@
#include "Extension/Boot/ea_app_block.h"
#include "Extension/Boot/ea_service_block.h"
#include "Extension/Boot/descriptor_heap_size.h"
#include "Extension/Boot/game_fatal_dump.h"
#include "Extension/Boot/eadp_errors_arena.h"
#include "Extension/Assets/native_patch_support.h"
#include "Extension/Assets/mod_layers.h"
@@ -48,6 +49,9 @@ bool initialize_bootstrap(std::uintptr_t base) {
// The memory ledger, when RESKATE_MEMORY_TRACE asks for it: here, while the game is still
// suspended and before the pools below are enlarged, so it sees who makes all of them.
console::start_memory_trace_from_environment();
// (Not needed for the game to run: a mismatch leaves crash reports at what the game writes.)
error.clear(); ready = start_game_fatal_dump(base, error);
(void)stage(Channel::runtime, "Crash dumps from the game's own fatal handlers", ready, error);
error.clear(); ready = start_native_patch_support(base, error);
if (!stage(Channel::assets, "Native InitFS/package support", ready, error)) return false;
error.clear(); ready = start_mod_layers(base, error);