comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @ 2136:c91cc404ca46

7011940: iCMS: SIGSEGV in SweepClosure::do_already_free_chunk(FreeChunk*)+0x360 Summary: Revert a (relaxed version of the) bounds-check that was incorrectly removed in the fix for 7008136. Reviewed-by: jmasa, johnc
author ysr
date Thu, 13 Jan 2011 11:33:56 -0800
parents 4947ee68d19c
children ffd725ff6943
comparison
equal deleted inserted replaced
2135:2e0b0c4671e4 2136:c91cc404ca46
8117 // this is a free chunk that can potentially be coalesced by the sweeper; 8117 // this is a free chunk that can potentially be coalesced by the sweeper;
8118 if (!inFreeRange()) { 8118 if (!inFreeRange()) {
8119 // if the next chunk is a free block that can't be coalesced 8119 // if the next chunk is a free block that can't be coalesced
8120 // it doesn't make sense to remove this chunk from the free lists 8120 // it doesn't make sense to remove this chunk from the free lists
8121 FreeChunk* nextChunk = (FreeChunk*)(addr + size); 8121 FreeChunk* nextChunk = (FreeChunk*)(addr + size);
8122 if (nextChunk->isFree() && // The next chunk is free... 8122 assert((HeapWord*)nextChunk <= _sp->end(), "Chunk size out of bounds?");
8123 nextChunk->cantCoalesce()) { // ... but cant be coalesced 8123 if ((HeapWord*)nextChunk < _sp->end() && // There is another free chunk to the right ...
8124 nextChunk->isFree() && // ... which is free...
8125 nextChunk->cantCoalesce()) { // ... but can't be coalesced
8124 // nothing to do 8126 // nothing to do
8125 } else { 8127 } else {
8126 // Potentially the start of a new free range: 8128 // Potentially the start of a new free range:
8127 // Don't eagerly remove it from the free lists. 8129 // Don't eagerly remove it from the free lists.
8128 // No need to remove it if it will just be put 8130 // No need to remove it if it will just be put