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
ProblemTextFilter cache is not atomic across its two fields #127
getFilters() keeps the cache in two separate volatile fields (cachedRawFilterList, cachedFilters) and updates them one after the other. A concurrent caller can therefore get a filter list that was parsed from a different raw string than the one it checked against.
This cannot happen today: the only caller (DocumentMarkupModelScanner) always runs on the EDT. It becomes a real bug as soon as isFiltered is called from another thread, for example a background scan or parallel tests (see #126).
Proposed fix: keep one immutable holder record Cache(String raw, List<Predicate<String>> filters) in a single volatile field and replace it in one write.
Activity