RFR: 8255448: Fastdebug JVM crashes with Vector API when PrintAssembly is turned on [v3]

Vladimir Ivanov vlivanov at openjdk.java.net
Fri Nov 13 14:04:03 UTC 2020


On Fri, 13 Nov 2020 10:57:26 GMT, Dongbo He <dongbohe at openjdk.org> wrote:

>> 8255448: Fastdebug JVM crashes with Vector API when PrintAssembly is turned on
>
> Dongbo He has updated the pull request incrementally with one additional commit since the last revision:
> 
>   rm 8253623

src/hotspot/share/opto/vector.cpp line 245:

> 243: 
> 244:     uint first_ind = (sfpt->req() - sfpt->jvms()->scloff());
> 245:     ciKlass* cik = vec_box->box_type()->is_oopptr()->klass();

Much better, thanks!

I suggest to simplify it as follows:
diff --git a/src/hotspot/share/opto/vector.cpp b/src/hotspot/share/opto/vector.cpp
index 667ca0592e0..e194683be4a 100644
--- a/src/hotspot/share/opto/vector.cpp
+++ b/src/hotspot/share/opto/vector.cpp
@@ -244,12 +244,16 @@ void PhaseVector::scalarize_vbox_node(VectorBoxNode* vec_box) {
   while (safepoints.size() > 0) {
     SafePointNode* sfpt = safepoints.pop()->as_SafePoint();
 
+    ciInstanceKlass* iklass = vec_box->box_type()->klass()->as_instance_klass();
+    int n_fields = iklass->nof_nonstatic_fields();
+    assert(n_fields == 1, "sanity");
+
     uint first_ind = (sfpt->req() - sfpt->jvms()->scloff());
     Node* sobj = new SafePointScalarObjectNode(vec_box->box_type(),
 #ifdef ASSERT
                                                NULL,
 #endif // ASSERT
-                                               first_ind, /*n_fields=*/1);
+                                               first_ind, n_fields);
     sobj->init_req(0, C->root());
     sfpt->add_req(vec_value);
 ```

-------------

PR: https://git.openjdk.java.net/jdk/pull/853


More information about the hotspot-compiler-dev mailing list