Skip to content

Commit ef3ddb1

Browse files
Dongbo HeHuang Wang
authored andcommitted
8255448: Fastdebug JVM crashes with Vector API when PrintAssembly is turned on
Co-authored-by: Huang Wang <wanghuang3@huawei.com> Reviewed-by: vlivanov
1 parent eb02184 commit ef3ddb1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/hotspot/share/opto/vector.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,16 @@ void PhaseVector::scalarize_vbox_node(VectorBoxNode* vec_box) {
241241
while (safepoints.size() > 0) {
242242
SafePointNode* sfpt = safepoints.pop()->as_SafePoint();
243243

244+
ciInstanceKlass* iklass = vec_box->box_type()->klass()->as_instance_klass();
245+
int n_fields = iklass->nof_nonstatic_fields();
246+
assert(n_fields == 1, "sanity");
247+
244248
uint first_ind = (sfpt->req() - sfpt->jvms()->scloff());
245249
Node* sobj = new SafePointScalarObjectNode(vec_box->box_type(),
246250
#ifdef ASSERT
247251
NULL,
248252
#endif // ASSERT
249-
first_ind, /*n_fields=*/1);
253+
first_ind, n_fields);
250254
sobj->init_req(0, C->root());
251255
sfpt->add_req(vec_value);
252256

0 commit comments

Comments
 (0)