mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7011940: iCMS: SIGSEGV in SweepClosure::do_already_free_chunk(FreeChunk*)+0x360
Revert a (relaxed version of the) bounds-check that was incorrectly removed in the fix for 7008136. Reviewed-by: jmasa, johnc
This commit is contained in:
parent
2464e6b369
commit
597a0cd214
1 changed files with 4 additions and 2 deletions
|
@ -8119,8 +8119,10 @@ void SweepClosure::do_already_free_chunk(FreeChunk* fc) {
|
|||
// if the next chunk is a free block that can't be coalesced
|
||||
// it doesn't make sense to remove this chunk from the free lists
|
||||
FreeChunk* nextChunk = (FreeChunk*)(addr + size);
|
||||
if (nextChunk->isFree() && // The next chunk is free...
|
||||
nextChunk->cantCoalesce()) { // ... but cant be coalesced
|
||||
assert((HeapWord*)nextChunk <= _sp->end(), "Chunk size out of bounds?");
|
||||
if ((HeapWord*)nextChunk < _sp->end() && // There is another free chunk to the right ...
|
||||
nextChunk->isFree() && // ... which is free...
|
||||
nextChunk->cantCoalesce()) { // ... but can't be coalesced
|
||||
// nothing to do
|
||||
} else {
|
||||
// Potentially the start of a new free range:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue