Skip to content

Conversation

@mujacica
Copy link

@mujacica mujacica commented Oct 22, 2025

When handling an exception, the Crashpad handler will scan all modules in a process. The first one that has a CrashpadInfo structure populated with a value other than TriState::kUnset for this field will dictate whether stack capture is adjusted.

This causes Crashpad to calculate stack capture range based on the current stack pointer instead of using TEB StackLimit/StackBase values. This is useful when running under Wine/Proton where TEB values may be incorrect.

More info: https://github.com/ValveSoftware/wine/blob/8b5ff79bcef26007edd5f1f517ba823f56c01bf3/dlls/dbghelp/minidump.c#L102

Tracking parent PR: getsentry/sentry-native#1427

@mujacica mujacica force-pushed the feat/stack_limit_sp branch from 584fd63 to 94636a4 Compare October 24, 2025 13:28
Copy link
Collaborator

@supervacuus supervacuus left a comment

Choose a reason for hiding this comment

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

Generally fine with the change, given that it is optional anyway. Minor topics that we can improve.

@mujacica mujacica merged commit d8990d2 into getsentry Oct 28, 2025
17 checks passed
@mujacica mujacica deleted the feat/stack_limit_sp branch October 28, 2025 12:41
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.

4 participants