Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
## Unreleased

**Fixes**:

- Honor checks before launching crash reporter ([#1906](https://github.com/getsentry/sentry-native/pull/1906))
- Reduce the size of native-generated minidumps on Windows ([#1929](https://github.com/getsentry/sentry-native/pull/1929))

## 0.16.0

Expand Down
12 changes: 10 additions & 2 deletions src/backends/native/minidump/sentry_minidump_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@ sentry__write_minidump(
break;

case SENTRY_MINIDUMP_MODE_SMART:
dump_type
= MiniDumpWithIndirectlyReferencedMemory | MiniDumpWithDataSegs;
// Only indirectly-referenced memory: dbghelp walks the stack and
// registers and captures a small window around each pointer that
// lands in mapped memory. We deliberately omit MiniDumpWithDataSegs
// here: it writes the entire writable data segment of *every*
// loaded module (all DLL .data/.bss), which is uncapped and
// dominates dump size — for large module graphs it produces dumps
// 10-30x larger than intended. Global/static data is rarely needed
// for crash triage; callers that want it can opt in via
// sentry_options_set_minidump_flags() or MODE_FULL.
dump_type = MiniDumpWithIndirectlyReferencedMemory;
break;

case SENTRY_MINIDUMP_MODE_FULL:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_integration_native.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,8 @@ def test_native_smart_mode_captures_indirect_heap_memory(cmake, httpserver):
appends a chunk around each writable-heap hit to
MemoryListStream.
* Windows: the native backend passes
``MiniDumpWithIndirectlyReferencedMemory | MiniDumpWithDataSegs``
to ``MiniDumpWriteDump`` so the OS does the equivalent scan.
``MiniDumpWithIndirectlyReferencedMemory`` to
``MiniDumpWriteDump`` so the OS does the equivalent scan.

The minimal-mode fallback on macOS (when ``task_for_pid`` is
blocked by the sandbox) silently breaks the SMART-mode contract by
Expand Down
Loading