test: concurrent page allocator - #2035
Open
jpnurmi wants to merge 3 commits into
Open
Conversation
Exercise the page allocator from synchronized threads and verify that allocations remain independent. This exposes missing spinlock ordering under ThreadSanitizer.
This reverts commit b603e3c.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2035 +/- ##
==========================================
+ Coverage 74.21% 74.36% +0.15%
==========================================
Files 104 104
Lines 26627 26627
Branches 4844 4844
==========================================
+ Hits 19762 19802 +40
+ Misses 5519 5477 -42
- Partials 1346 1348 +2 🚀 New features to boost your workflow:
|
jpnurmi
marked this pull request as ready for review
August 28, 2026 16:40
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.
The crashes in #974 were likely caused by the old Unix page allocator spinlock, whose unlock lacked release semantics. On ARM64 this could corrupt allocator state and produce overlapping allocations;
sentry_value_set_by_key_nwas where the resulting object corruption surfaced.The synchronization was corrected in #1446. This PR adds the missing regression test: multiple threads allocate concurrently, write unique markers, and verify that every allocation remains independent.
Temporarily restoring the non-atomic pre-#1446 unlock reproduces the race under TSAN, while the corrected implementation passes:
https://github.com/getsentry/sentry-native/actions/runs/33185811927/job/98898403787?pr=2035
Close: #974