diff -r 29b0d0b61615 -r a6deb69743d4 src/hotspot/share/gc/shared/workgroup.cpp --- a/src/hotspot/share/gc/shared/workgroup.cpp Mon Nov 25 12:31:39 2019 +0100 +++ b/src/hotspot/share/gc/shared/workgroup.cpp Mon Nov 25 12:32:07 2019 +0100 @@ -164,7 +164,7 @@ void worker_done_with_task() { // Mark that the worker is done with the task. // The worker is not allowed to read the state variables after this line. - uint not_finished = Atomic::sub(1u, &_not_finished); + uint not_finished = Atomic::sub(&_not_finished, 1u); // The last worker signals to the coordinator that all work is completed. if (not_finished == 0) {