Completed
Details
Assignee
Alexander RedingtonAlexander RedingtonReporter
Alexander RedingtonAlexander RedingtonLabels
Approval
OkPatch
CodePriority
CriticalAffects versions
Fix versions
Details
Details
Assignee
Alexander Redington
Alexander RedingtonReporter
Alexander Redington
Alexander RedingtonLabels
Approval
Ok
Patch
Code
Priority
Affects versions
Fix versions
Created September 19, 2014 at 4:55 PM
Updated July 18, 2015 at 12:55 AM
Resolved July 18, 2015 at 12:55 AM
clojure.test/inc-report-counter function combines dereferencing the report-counters ref and operating on the previous state of the ref, leading to race conditions during concurrent use.
(dosync (commute *report-counters* assoc name (inc (or (*report-counters* name) 0))))
Approach: Rewrite update function to be entirely in terms of the old state:
(dosync (commute *report-counters* update-in [name] (fnil inc 0)))
Patch: fix-CLJ-1528.diff
Screened by: Alex Miller