Аудит модели памяти Java (JMM)
testing
audit-jmm is a Claude Code skill that performs a Java Memory Model audit of all cache fields accessed via VarHandle, Unsafe, volatile declarations, or synchronization blocks. For each field, it records the declared access mode, enumerates every read and write with the enclosing method, line, and locks held, and determines whether a happens-before relationship is guaranteed for every (write, read) pair. The skill targets four specific problem areas: writeTime encoding both a timestamp and a refresh-in-progress flag, whether opaque access is sufficient for accessTime expiration, whether value reads propagate visibility of an object's own fields, and the correlated-but-separately-updated policyWeight vs weight pair. Every identified issue is accompanied by a concrete two-thread execution trace verified as legal under the JMM — with particular focus on aarch64, where ARM's weaker-than-TSO ordering exposes reordering bugs that x86's TSO model masks.
- #jmm
- #memory-model
- #varhandle
- #volatile
- #concurrency
- #arm-aarch64