Skip to content

fix(windows): report actual stack reserve factor in stack guarantee warning - #2313

Merged
jpnurmi merged 3 commits into
getsentry:masterfrom
HlustikP:fix/stack-guarantee-warning-factor
Nov 17, 2026
Merged

jpnurmi merged 3 commits into
getsentry:masterfrom
HlustikP:fix/stack-guarantee-warning-factor

Conversation

@HlustikP

Copy link
Copy Markdown
Contributor

Hello,

The warning emitted by sentry__set_default_thread_stack_guarantee() when a thread's stack reserve is too small prints an "actual" factor, but it was computed from expected_stack_reserve instead of thread_stack_reserve. So it always showed the expected factor (e.g. expected: 2x, actual: 2.00x), which made the log useless for diagnosing the problem.

Regards, Patrick

@jpnurmi jpnurmi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Cast `thread_stack_reserve` to `double` explicitly. The implicit 64-bit
`size_t` to `double` conversion trips `-Wimplicit-int-float-conversion`.
@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.69%. Comparing base (5eba64f) to head (d64f4c6).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2313      +/-   ##
==========================================
+ Coverage   75.62%   75.69%   +0.07%     
==========================================
  Files         104      104              
  Lines       28443    28443              
  Branches     5220     5220              
==========================================
+ Hits        21510    21531      +21     
+ Misses       5585     5570      -15     
+ Partials     1348     1342       -6     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi
jpnurmi merged commit 411e21c into getsentry:master Nov 17, 2026
103 of 105 checks passed
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