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
fix: resolve race condition in reference counting logging
The Close() method had a race condition between decrementing the
reference count and reading it for logging. This could cause incorrect
values to be logged when the reference count changed between the
Add(-1) and Load() operations.
Fixed by capturing the result of Add(-1) and using it directly,
eliminating the race window.
Note: This fix only addresses the logging race. The use-after-free
concern is already prevented by the cache implementation which removes
entries from its map before calling Close(), ensuring no new references
can be obtained once eviction begins.
0 commit comments