Repository navigation
Closed
Labels
Improvementimprovement for existing features
Description
Problem Statement
We need complete process memory in crash dumps on Windows, macOS and Linux to debug heap corruption, use-after-free, and a bad value read from a heap object several frames before the crash. Today none of the backends delivers that on all three platforms:
crashpad/breakpad:sentry_options_set_minidump_mode()andsentry_options_set_minidump_flags()are documented asnative-only, so these backends have no way to ask for more than the default minidump.native, Windows:SENTRY_MINIDUMP_MODE_FULLmaps toMiniDumpWithFullMemory(sentry_minidump_windows.c#L71). This one works as expected.native, Linux: FULL selects every readable mapping, but each region is cut to its first 4 MB by a hard-codedMAX_REGION_SIZEthat also applies in FULL mode (sentry_minidump_linux.c#L2311). Large heap arenas and big anonymous mappings are silently truncated.native, macOS: the same 4 MB cap applies per region (sentry_minidump_macos.c#L1638). Memory capture also depends ontask_for_pid()on the crashed process (L1753). When that call fails, which is common for signed, hardened-runtime apps, the writer falls back to a minimal dump with no process memory, whatever mode was selected.
So a user who sets SENTRY_MINIDUMP_MODE_FULL gets a full dump only on Windows. On Linux and macOS they get a partial dump, or none of the requested memory, and nothing tells them.
Solution Brainstorm
- Make FULL mean full in the
nativebackend on Linux and macOS: don't apply the 4 MB per-region cap in FULL mode, or make the cap configurable, for example with a total-size budget setter, so users control the trade-off. - macOS without
task_for_pid: document the entitlement and runtime requirements for FULL. If possible, capture memory from the in-process handler, or hand a task port from the crashing process to the daemon at init, so that hardened apps also get memory. At minimum, log a warning when FULL was requested but only a minimal dump could be written. - Extend
sentry_options_set_minidump_mode()(and the Windows flags) to thecrashpadbackend on all three platforms. On Windows, forward the mode or flags tocrashpad_handler. On macOS and Linux, have the Crashpad snapshot include all readable mappings. SMART could map to Crashpad's existinggather_indirectly_referenced_memory, which sentry-native doesn't expose today.
If (3) is out of scope, (1) and (2) alone would give users one backend with reliable full dumps on all three platforms.
Product Area
Settings
Metadata
Metadata
Assignees
Labels
Improvementimprovement for existing features
Projects
- StatusShow more project fieldsNo status
Activity
linear-code commentedon Oct 18, 2026
NATIVE-237
jpnurmi commentedon Oct 19, 2026
Thanks for the proposal. We'll take a look at what we can do. Not yet sure whether dropping the arbitrary limit for
FULLis the way to go. It's tempting because of the name, but it could cause issues when too much is too much. 🙂 Perhaps we can either do something with the existingminidump_flagsor expose another explicit limit option alongside.fix(native): Capture complete memory in full minidumps
fix(native): Capture complete memory in full minidumps
fix(native): Capture complete memory in full minidumps (#2281)
jpnurmi commentedon Nov 6, 2026
We decided to make
MINIDUMP_MODE_FULLmean full on all platforms, as it already did on Windows. The fix has been merged into thev1branch and will be available in a 1.0 pre-release in the near future: