You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 004d861
Browse filesBrowse the repository at this point in the historyBrowse files
fix(core): Make feature flag buffer merging thread-safe (#5989)
* fix(core): Make feature flag buffer merging thread-safe (JAVA-704)
FeatureFlagBuffer.merged() read size() and then indexed into the live
CopyOnWriteArrayList held by each buffer. add() mutates in three steps
(remove, add, remove), so the list transiently shrinks and a merging
thread could index past its end. Scopes.captureEventInternal swallows
the resulting ArrayIndexOutOfBoundsException, so the event is silently
dropped, including events from the uncaught exception handler.
Capturing the list reference did not help: the field was never
reassigned, so every reader saw the same live list. Hold an immutable
list behind the volatile field instead and swap it under the existing
lock, so one volatile read yields a snapshot that can no longer change.
This also makes clone() free, since it now shares the list rather than
copying it, and cuts add() from three full array copies down to one.
CopyOnWriteArrayList is no longer needed and maxSize becomes final,
which it always should have been.
Entries carrying identical timestamps now resolve in favour of the most
specific scope, CURRENT over ISOLATION over GLOBAL, rather than the
reverse.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* changelog
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,7 @@
52
52
53
53
- Prevents inclusion of `null.` prefix before default-package class names when parsing Java and JNI frames from Android ANR thread dumps ([#5979](https://github.com/getsentry/sentry-java/pull/5979))
54
54
- Prevent duplicated breadcrumbs on tombstone-merged native crash events ([#5888](https://github.com/getsentry/sentry-java/pull/5888))
55
+
- Prevent events from being dropped when feature flags are added while an event is being captured ([#5989](https://github.com/getsentry/sentry-java/pull/5989))
55
56
- Prevent a class of Session Replay deadlocks by confining lifecycle state changes to Android's main thread ([#5965](https://github.com/getsentry/sentry-java/pull/5965))
56
57
- Symbolicate tombstone native frames for libraries loaded directly from APKs ([#5992](https://github.com/getsentry/sentry-java/pull/5992))
57
58
- Prevent a deadlock between the app start extension and the Android performance event processor ([#6007](https://github.com/getsentry/sentry-java/pull/6007))
0 commit comments