Originally found with https://github.com/shipilev/java-concurrency-torture Steps to reproduce: $ git clone https://github.com/shipilev/java-concurrency-torture.git $ cd java-concurrency-torture.git $ mvn clean install $ java -jar target/concurrency-torture.jar -t ".*primitiveAtomicity.*ShortAtomicityTest" Expected result: Only [0, 0] and [-1, -1] states present. Actual result: [0,0], [-1, -1] are present. One of [0, -1] or [-1, 0] states is present, which means the short value was torn away.
|