8158946: btree009 fails with assert(s > 0) failed: Bad size calculated

Set oop_size before setting _klass

Reviewed-by: coleenp, dholmes, kbarrett, tschatzl
This commit is contained in:
Derek White 2016-07-05 15:34:06 -04:00
parent 4e25b9f930
commit 2e1b011569
6 changed files with 42 additions and 9 deletions

View file

@ -258,8 +258,8 @@ int oopDesc::size_given_klass(Klass* klass) {
}
}
assert(s % MinObjAlignment == 0, "alignment check");
assert(s > 0, "Bad size calculated");
assert(s % MinObjAlignment == 0, "Oop size is not properly aligned: %d", s);
assert(s > 0, "Oop size must be greater than zero, not %d", s);
return s;
}