6642634: Test nsk/regression/b6186200 crashed with SIGSEGV

Use correct allocation path in expand_and_allocate() so object's mark and p-bits are set as appropriate.

Reviewed-by: jmasa, pbk
This commit is contained in:
Y. Srinivas Ramakrishna 2008-02-21 11:03:54 -08:00
parent 9c36dab8c4
commit 74f243990c

View File

@ -3121,12 +3121,7 @@ ConcurrentMarkSweepGeneration::expand_and_allocate(size_t word_size,
if (GCExpandToAllocateDelayMillis > 0) {
os::sleep(Thread::current(), GCExpandToAllocateDelayMillis, false);
}
size_t adj_word_sz = CompactibleFreeListSpace::adjustObjectSize(word_size);
if (parallel) {
return cmsSpace()->par_allocate(adj_word_sz);
} else {
return cmsSpace()->allocate(adj_word_sz);
}
return have_lock_and_allocate(word_size, tlab);
}
// YSR: All of this generation expansion/shrinking stuff is an exact copy of