Skip to content
Permalink
Browse files

8238961: Assertion failure in new field layout code when ContendedPad…

…dingWidth == 0

Reviewed-by: hseigel, coleenp
  • Loading branch information
Frederic Parain
Frederic Parain committed Feb 13, 2020
1 parent a4616a7 commit 30707f80076d2e7a23eb6f6fb1eac2299e64df28
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/hotspot/share/classfile/fieldLayoutBuilder.cpp
@@ -353,7 +353,7 @@ void FieldLayout::fill_holes(const InstanceKlass* super_klass) {
// If the super class has @Contended annotation, a padding block is
// inserted at the end to ensure that fields from the subclasses won't share
// the cache line of the last field of the contended class
if (super_klass->has_contended_annotations()) {
if (super_klass->has_contended_annotations() && ContendedPaddingWidth > 0) {
LayoutRawBlock* p = new LayoutRawBlock(LayoutRawBlock::PADDING, ContendedPaddingWidth);
p->set_offset(b->offset() + b->size());
b->set_next_block(p);

0 comments on commit 30707f8

Please sign in to comment.