Skip to content

fix(minidump): add module header pages to MemoryList and fix exception code#1576

Merged
mujacica merged 4 commits intomasterfrom
fix/minidump-module-header-pages
Mar 17, 2026
Merged

fix(minidump): add module header pages to MemoryList and fix exception code#1576
mujacica merged 4 commits intomasterfrom
fix/minidump-module-header-pages

Conversation

@mujacica
Copy link
Copy Markdown
Contributor

Three fixes for the native minidump writer:

  1. Use raw signal number as exception_code (e.g. 11 for SIGSEGV) instead of Windows-style 0x40000000|signum. This matches breakpad/crashpad convention and fixes lldb hanging when loading our minidumps.

  2. Include first page (4096 bytes) of each loaded module in the MemoryList stream for SMART mode on both Linux and macOS. Debuggers need these ELF/Mach-O headers for offline symbolication when symbol files aren't available locally, matching breakpad/crashpad behavior.

  3. On macOS, capture module header pages in the signal handler and save them to disk. System dylibs in the dyld shared cache don't exist as individual files, so the daemon reads headers from a capture file written by the crashed process instead of requiring task_for_pid.

mujacica added a commit that referenced this pull request Mar 12, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mujacica mujacica marked this pull request as ready for review March 13, 2026 02:54
mujacica added a commit that referenced this pull request Mar 16, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mujacica mujacica force-pushed the fix/minidump-module-header-pages branch from 1125a14 to ea35e47 Compare March 16, 2026 10:32
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 4 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

mujacica and others added 4 commits March 16, 2026 13:29
…n code

Three fixes for the native minidump writer:

1. Use raw signal number as exception_code (e.g. 11 for SIGSEGV) instead
   of Windows-style 0x40000000|signum. This matches breakpad/crashpad
   convention and fixes lldb hanging when loading our minidumps.

2. Include first page (4096 bytes) of each loaded module in the MemoryList
   stream for SMART mode on both Linux and macOS. Debuggers need these
   ELF/Mach-O headers for offline symbolication when symbol files aren't
   available locally, matching breakpad/crashpad behavior.

3. On macOS, capture module header pages in the signal handler and save
   them to disk. System dylibs in the dyld shared cache don't exist as
   individual files, so the daemon reads headers from a capture file
   written by the crashed process instead of requiring task_for_pid.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mujacica mujacica force-pushed the fix/minidump-module-header-pages branch from 8dbcd90 to 414cb35 Compare March 16, 2026 12:47
@mujacica mujacica merged commit 9cad572 into master Mar 17, 2026
51 checks passed
@mujacica mujacica deleted the fix/minidump-module-header-pages branch March 17, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants