Repository navigation
fix(unwinder): Reduce maps buffer stack usage - #2212
Merged
Merged
Conversation
#2174 brought the SDK unwinder's 4 KiB `/proc/self/maps` buffer onto the native signal-handler stack. Use 512 bytes; preserve oversized lines and address prefixes split across reads without new allocations. GCC 15 `-O3`, Linux x86-64, Ryzen AI 9 HX 370: | Measurement | 4096 B | 512 B | | --- | ---: | ---: | | Native handler peak (B) | 6,344 | 3,424 | | Maps lookups, 190 KiB / 1,900 mappings (ms) | 0.406 | 0.490 | | Maps lookups, 308 KiB / 3,053 mappings (ms) | 0.776 | 0.972 | This saves 2,920 bytes of handler stack at the cost of more reads. Lookup timings are warm code/stack lookup pairs: medians of nine rotating batches, excluding unwinding and other crash handling.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1 #2212 +/- ##
==========================================
+ Coverage 75.48% 75.56% +0.07%
==========================================
Files 105 105
Lines 29642 29642
Branches 5479 5479
==========================================
+ Hits 22375 22398 +23
+ Misses 5851 5820 -31
- Partials 1416 1424 +8 🚀 New features to boost your workflow:
|
JoshuaMoelans
approved these changes
Oct 19, 2026
mujacica
approved these changes
Oct 19, 2026
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.
#2174 brought the SDK unwinder's 4 KiB

/proc/self/mapsbuffer onto the native signal-handler stack in thev1branch:Use 512 bytes; preserve oversized lines and address prefixes split across reads without new allocations. GCC 15
-O3, Linux x86-64, Ryzen AI 9 HX 370:This saves 2,920 bytes of handler stack at the cost of more reads. Lookup timings are warm code/stack lookup pairs: medians of nine rotating batches, excluding unwinding and other crash handling.