Repository navigation
Conversation
jpnurmi
added a commit
that referenced
this pull request
Nov 18, 2026
The SMART mode callback returned `FALSE` for `ReadMemoryFailureCallback`. Per the dbghelp docs, anything but `TRUE` with `S_OK` "results in a failure to write to the minidump", so one unreadable block, such as an image page unmapped after `VirtualQueryEx` checked it, failed the whole dump. Return `TRUE` with `S_OK` so dbghelp omits the block instead. Ref: #2321 (comment)
jpnurmi
added a commit
that referenced
this pull request
Nov 18, 2026
The Windows SMART mode callback only scanned thread stacks for pointers into image data, while the Linux and macOS walkers also scan registers. A string literal pointer held only in a register, such as a call argument at the crash, was left out of the dump. Also scan the general-purpose registers of each thread and the crashing thread's exception context. Ref: #2321 (comment)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fa70d8f. Configure here.
jpnurmi
added a commit
that referenced
this pull request
Nov 18, 2026
Without `task_for_pid` access, the macOS daemon only parsed universal binaries with a 32-bit `FAT_MAGIC` header, so modules in a `FAT_MAGIC_64` file got no `__TEXT,__cstring` or `__TEXT,__const` pages. Walk the `fat_arch_64` entries of those files too. Ref: #2321 (comment)
jpnurmi
force-pushed
the
jpnurmi/feat/native-rodata
branch
from
November 19, 2026 08:53
2009430 to
1b73f6c
Compare
jpnurmi
added a commit
that referenced
this pull request
Nov 19, 2026
The SMART mode callback returned `FALSE` for `ReadMemoryFailureCallback`. Per the dbghelp docs, anything but `TRUE` with `S_OK` "results in a failure to write to the minidump", so one unreadable block, such as an image page unmapped after `VirtualQueryEx` checked it, failed the whole dump. Return `TRUE` with `S_OK` so dbghelp omits the block instead. Ref: #2321 (comment)
jpnurmi
added a commit
that referenced
this pull request
Nov 19, 2026
The Windows SMART mode callback only scanned thread stacks for pointers into image data, while the Linux and macOS walkers also scan registers. A string literal pointer held only in a register, such as a call argument at the crash, was left out of the dump. Also scan the general-purpose registers of each thread and the crashing thread's exception context. Ref: #2321 (comment)
jpnurmi
added a commit
that referenced
this pull request
Nov 19, 2026
Without `task_for_pid` access, the macOS daemon only parsed universal binaries with a 32-bit `FAT_MAGIC` header, so modules in a `FAT_MAGIC_64` file got no `__TEXT,__cstring` or `__TEXT,__const` pages. Walk the `fat_arch_64` entries of those files too. Ref: #2321 (comment)
jpnurmi
added a commit
that referenced
this pull request
Nov 19, 2026
The SMART mode callback returned `FALSE` for `ReadMemoryFailureCallback`. Per the dbghelp docs, anything but `TRUE` with `S_OK` "results in a failure to write to the minidump", so one unreadable block, such as an image page unmapped after `VirtualQueryEx` checked it, failed the whole dump. Return `TRUE` with `S_OK` so dbghelp omits the block instead. Ref: #2321 (comment)
jpnurmi
force-pushed
the
jpnurmi/feat/native-rodata
branch
from
November 19, 2026 10:53
1b73f6c to
29c0ef1
Compare
jpnurmi
added a commit
that referenced
this pull request
Nov 19, 2026
The Windows SMART mode callback only scanned thread stacks for pointers into image data, while the Linux and macOS walkers also scan registers. A string literal pointer held only in a register, such as a call argument at the crash, was left out of the dump. Also scan the general-purpose registers of each thread and the crashing thread's exception context. Ref: #2321 (comment)
jpnurmi
added a commit
that referenced
this pull request
Nov 19, 2026
Without `task_for_pid` access, the macOS daemon only parsed universal binaries with a 32-bit `FAT_MAGIC` header, so modules in a `FAT_MAGIC_64` file got no `__TEXT,__cstring` or `__TEXT,__const` pages. Walk the `fat_arch_64` entries of those files too. Ref: #2321 (comment)
SMART minidumps on Linux and macOS capture memory for pointers found on thread stacks and in registers. The capture window started 512 bytes below the pointer, so for a pointer in the first 512 bytes of a page it rounded down to the previous page and missed the pointee. For example, a pointer to `0x10000100` captured `0xffff000` to `0x10000000`. Capture the page that contains the pointer instead. Ref: #1694
SMART minidumps now also capture pages of module data, such as string literals in `.rodata`, that thread stacks and registers point to, so debuggers can show them from the dump alone.
The SMART mode callback returned `FALSE` for `ReadMemoryFailureCallback`. Per the dbghelp docs, anything but `TRUE` with `S_OK` "results in a failure to write to the minidump", so one unreadable block, such as an image page unmapped after `VirtualQueryEx` checked it, failed the whole dump. Return `TRUE` with `S_OK` so dbghelp omits the block instead. Ref: #2321 (comment)
The Windows SMART mode callback only scanned thread stacks for pointers into image data, while the Linux and macOS walkers also scan registers. A string literal pointer held only in a register, such as a call argument at the crash, was left out of the dump. Also scan the general-purpose registers of each thread and the crashing thread's exception context. Ref: #2321 (comment)
The SMART pointer walker only skipped pages it had captured itself,
so it captured thread stack pages, module header pages, `[heap]` and
the crash mapping a second time. Breakpad's processor rejects a memory
list with overlapping regions ("MinidumpMemoryList could not store
memory region"). In a Linux dump of a Qt app, 17 of 18 thread stacks
and the first pages of the executable and `ld-linux-x86-64.so.2`
appeared twice, and macOS duplicated stack pages the same way.
Write those regions to the memory list first and skip candidate pages
that overlap them.
Without `task_for_pid` access, the macOS daemon wrote a minimal SMART minidump that left out the string literals referenced from stacks. Apps only grant that access with the `get-task-allow` entitlement, which notarization rejects, so a `const char *` local in a crashed app showed no value. Read the referenced `__TEXT,__cstring` and `__TEXT,__const` pages from the module files on disk instead.
Without `task_for_pid` access, the macOS memory list held only module header pages and captured module data, but no thread stacks. Symbolicator reads stack variables through the memory list, so a `const char *` local showed no value even with the string captured. List the thread stacks first, as the task-port path already does.
Without `task_for_pid` access, the macOS daemon only parsed universal binaries with a 32-bit `FAT_MAGIC` header, so modules in a `FAT_MAGIC_64` file got no `__TEXT,__cstring` or `__TEXT,__const` pages. Walk the `fat_arch_64` entries of those files too. Ref: #2321 (comment)
jpnurmi
force-pushed
the
jpnurmi/feat/native-rodata
branch
from
November 19, 2026 14:20
29c0ef1 to
562bf90
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

SMART minidumps now also capture the pages of module data that thread stacks and registers point to, such as string literals in
.rodata, so debuggers can show those values from the dump alone.__TEXT,__cstring,__TEXT,__constand__DATA_CONSTof modules outside the dyld shared cache. Withouttask_for_pidaccess, such as in release builds without theget-task-allowentitlement, only the__TEXTsections are captured, read from the module files on disk..rdataand.datapages of loaded images, added through aMiniDumpWriteDumpmemory callback becauseMiniDumpWithIndirectlyReferencedMemoryskips image memory.Also fixes indirect capture on Linux and macOS taking the page before the pointee for pointers in the first 512 bytes of a page, and macOS minidumps written without
task_for_pidaccess leaving thread stacks out of the memory list.