--- old/src/hotspot/share/utilities/singleWriterSynchronizer.cpp 2019-11-21 11:55:44.469532287 +0100 +++ new/src/hotspot/share/utilities/singleWriterSynchronizer.cpp 2019-11-21 11:55:44.217528026 +0100 @@ -64,7 +64,7 @@ do { old = value; *new_ptr = ++value; - value = Atomic::cmpxchg(value, &_enter, old); + value = Atomic::cmpxchg(&_enter, old, value); } while (old != value); // Critical sections entered before we changed the polarity will use // the old exit counter. Critical sections entered after the change