diff -r 4cbfa5077d68 -r 623722a6aeb9 src/hotspot/share/runtime/deoptimization.cpp --- a/src/hotspot/share/runtime/deoptimization.cpp Mon Nov 25 12:32:40 2019 +0100 +++ b/src/hotspot/share/runtime/deoptimization.cpp Mon Nov 25 12:33:15 2019 +0100 @@ -869,7 +869,7 @@ static BoxCache* singleton(Thread* thread) { if (_singleton == NULL) { BoxCache* s = new BoxCache(thread); - if (!Atomic::replace_if_null(s, &_singleton)) { + if (!Atomic::replace_if_null(&_singleton, s)) { delete s; } } @@ -923,7 +923,7 @@ static BooleanBoxCache* singleton(Thread* thread) { if (_singleton == NULL) { BooleanBoxCache* s = new BooleanBoxCache(thread); - if (!Atomic::replace_if_null(s, &_singleton)) { + if (!Atomic::replace_if_null(&_singleton, s)) { delete s; } }