--- old/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2015-01-27 17:28:12.918323936 -0500 +++ new/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2015-01-27 17:28:12.634307515 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2015, 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 @@ -762,8 +762,11 @@ void CompactibleFreeListSpace::blk_iterate_careful(BlkClosureCareful* cl) { assert_lock_strong(freelistLock()); HeapWord *cur, *limit; - for (cur = bottom(), limit = end(); cur < limit; - cur += cl->do_blk_careful(cur)); + size_t res; + for (cur = bottom(), limit = end(); cur < limit; cur += res) { + res = cl->do_blk_careful(cur); + assert(cur + res > cur, "Not monotonically increasing ?"); + } } // Apply the given closure to each block in the space.