--- old/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp 2016-09-20 14:24:03.466496214 +0200 +++ new/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp 2016-09-20 14:24:03.362496210 +0200 @@ -7829,7 +7829,7 @@ assert(stack->isEmpty(), "Expected precondition"); assert(stack->capacity() > num, "Shouldn't bite more than can chew"); size_t i = num; - oop cur = _overflow_list; + oop cur = oop(_overflow_list); const markOop proto = markOopDesc::prototype(); NOT_PRODUCT(ssize_t n = 0;) for (oop next; i > 0 && cur != NULL; cur = next, i--) { @@ -7840,7 +7840,7 @@ assert(res, "Bit off more than can chew?"); NOT_PRODUCT(n++;) } - _overflow_list = cur; + _overflow_list = (oopDesc*)cur; #ifndef PRODUCT assert(_num_par_pushes >= n, "Too many pops?"); _num_par_pushes -=n; @@ -7935,7 +7935,7 @@ // we left it in a short while ago; in that case we may be // able to place back the suffix without incurring the cost // of a walk down the list. - oop observed_overflow_list = _overflow_list; + oop observed_overflow_list = oop(_overflow_list); oop cur_overflow_list = observed_overflow_list; bool attached = false; while (observed_overflow_list == BUSY || observed_overflow_list == NULL) { @@ -7954,7 +7954,7 @@ oop suffix_tail = cur; assert(suffix_tail != NULL && suffix_tail->mark() == NULL, "Tautology"); - observed_overflow_list = _overflow_list; + observed_overflow_list = oop(_overflow_list); do { cur_overflow_list = observed_overflow_list; if (cur_overflow_list != BUSY) { @@ -7997,7 +7997,7 @@ assert(p->is_oop(), "Not an oop"); preserve_mark_if_necessary(p); p->set_mark((markOop)_overflow_list); - _overflow_list = p; + _overflow_list = (oopDesc*)p; } // Multi-threaded; use CAS to prepend to overflow list @@ -8005,7 +8005,7 @@ NOT_PRODUCT(Atomic::inc_ptr(&_num_par_pushes);) assert(p->is_oop(), "Not an oop"); par_preserve_mark_if_necessary(p); - oop observed_overflow_list = _overflow_list; + oop observed_overflow_list = oop(_overflow_list); oop cur_overflow_list; do { cur_overflow_list = observed_overflow_list; --- old/src/share/vm/gc/cms/concurrentMarkSweepGeneration.hpp 2016-09-20 14:24:04.194496247 +0200 +++ new/src/share/vm/gc/cms/concurrentMarkSweepGeneration.hpp 2016-09-20 14:24:04.094496242 +0200 @@ -540,7 +540,7 @@ // Overflow list of grey objects, threaded through mark-word // Manipulated with CAS in the parallel/multi-threaded case. - oop _overflow_list; + oopDesc* volatile _overflow_list; // The following array-pair keeps track of mark words // displaced for accommodating overflow list above. // This code will likely be revisited under RFE#4922830. --- old/src/share/vm/gc/cms/parNewGeneration.cpp 2016-09-20 14:24:04.862496276 +0200 +++ new/src/share/vm/gc/cms/parNewGeneration.cpp 2016-09-20 14:24:04.754496272 +0200 @@ -1286,7 +1286,7 @@ listhead->forward_to(from_space_obj); from_space_obj = listhead; } - oop observed_overflow_list = _overflow_list; + oop observed_overflow_list = oop(_overflow_list); oop cur_overflow_list; do { cur_overflow_list = observed_overflow_list; @@ -1386,7 +1386,7 @@ // It's possible that the list is still in the empty(busy) state // we left it in a short while ago; in that case we may be // able to place back the suffix. - oop observed_overflow_list = _overflow_list; + oop observed_overflow_list = oop(_overflow_list); oop cur_overflow_list = observed_overflow_list; bool attached = false; while (observed_overflow_list == BUSY || observed_overflow_list == NULL) { @@ -1405,7 +1405,7 @@ last = last->list_ptr_from_klass(); } // Atomically prepend suffix to current overflow list - observed_overflow_list = _overflow_list; + observed_overflow_list = oop(_overflow_list); do { cur_overflow_list = observed_overflow_list; if (cur_overflow_list != BUSY) { --- old/src/share/vm/gc/cms/parNewGeneration.hpp 2016-09-20 14:24:05.522496306 +0200 +++ new/src/share/vm/gc/cms/parNewGeneration.hpp 2016-09-20 14:24:05.414496301 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -323,7 +323,7 @@ // A list of from-space images of to-be-scanned objects, threaded through // klass-pointers (klass information already copied to the forwarded // image.) Manipulated with CAS. - oop _overflow_list; + oopDesc* volatile _overflow_list; NOT_PRODUCT(ssize_t _num_par_pushes;) // This closure is used by the reference processor to filter out @@ -383,7 +383,7 @@ NOT_PRODUCT(bool should_simulate_overflow();) // Accessor for overflow list - oop overflow_list() { return _overflow_list; } + oop overflow_list() { return oop(_overflow_list); } // Push the given (from-space) object on the global overflow list. void push_on_overflow_list(oop from_space_obj, ParScanThreadState* par_scan_state);