Skip to content

fix(linux): Match extra memory exclusion to the captured stack - #173

Merged
jpnurmi merged 1 commit into
getsentryfrom
jpnurmi/fix/linux-stack-region-size
Oct 3, 2026
Merged

jpnurmi merged 1 commit into
getsentryfrom
jpnurmi/fix/linux-stack-region-size

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

A follow-up to:

CaptureMemoryDelegateLinux excludes the full stack even when max_stack_capture_size truncates the snapshot. With indirect memory gathering enabled, referenced memory in the discarded portion is omitted as brought up at:

Pass a ProcessReaderLinux::Thread copy with stack_region_size set to the captured size so the exclusion matches the snapshot. This preserves the reader's thread metadata and captures extra memory within its budget.

`CaptureMemoryDelegateLinux` excludes the full stack even when
`max_stack_capture_size` truncates the snapshot. With indirect memory
gathering enabled, referenced memory in the discarded portion is omitted.

Pass a `ProcessReaderLinux::Thread` copy with `stack_region_size` set to
the captured size so the exclusion matches the snapshot. This preserves
the reader's thread metadata and captures extra memory within its budget.

Original change: #172
Reported by Cursor Bugbot while reviewing `44144ca6` in PR #1:
#1 (comment)
@jpnurmi
jpnurmi requested a review from mujacica October 1, 2026 15:20
@jpnurmi
jpnurmi merged commit d0fb049 into getsentry Oct 3, 2026
27 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/fix/linux-stack-region-size branch October 3, 2026 12:20
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