RFR: 8287700: C2 Crash running eclipse benchmark from Dacapo
Roland Westrelin
roland at openjdk.java.net
Tue Jun 7 14:43:26 UTC 2022
With 8275201 (C2: hide klass() accessor from TypeOopPtr and typeKlassPtr subclasses), I made the following change to escape.cpp:
@@ -2628,7 +2632,7 @@ bool ConnectionGraph::split_AddP(Node *addp, Node *base) {
// this code branch will go away.
//
if (!t->is_known_instance() &&
- !base_t->klass()->is_subtype_of(t->klass())) {
+ !t->maybe_java_subtype_of(base_t)) {
return false; // bail out
}
const TypeOopPtr *tinst = base_t->add_offset(t->offset())->is_oopptr();
@@ -3312,7 +3316,7 @@ void ConnectionGraph::split_unique_types(GrowableArray<Node *> &alloc_worklist,
} else {
tn_t = tn_type->isa_oopptr();
}
- if (tn_t != NULL && tinst->klasgs()->is_subtype_of(tn_t->klass())) {
+ if (tn_t != NULL && tn_t->maybe_java_subtype_of(tinst)) {
if (tn_type->isa_narrowoop()) {
tn_type = tinst->make_narrowoop();
} else {
@@ -3325,7 +3329,7 @@ void ConnectionGraph::split_unique_types(GrowableArray<Node *> &alloc_worklist,
record_for_optimizer(n);
} else {
assert(tn_type == TypePtr::NULL_PTR ||
- tn_t != NULL && !tinst->klass()->is_subtype_of(tn_t->klass()),
+ tn_t != NULL && !tinst->is_java_subtype_of(tn_t),
"unexpected type");
continue; // Skip dead path with different type
}
Where I inverted the subtype and supertype in a subtype check (that is `tn_t->maybe_java_subtype_of(tinst)` when it was `tinst->klasgs()->is_subtype_of(tn_t->klass())`) in 2 places for no good reason AFAICT now. The assert used to also test the same condition as the if above but I changed that by mistake. This fixes addresses both issues.
-------------
Commit messages:
- comment
- fix & test
Changes: https://git.openjdk.java.net/jdk/pull/9054/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9054&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8287700
Stats: 76 lines in 2 files changed: 73 ins; 0 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/9054.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/9054/head:pull/9054
PR: https://git.openjdk.java.net/jdk/pull/9054
More information about the hotspot-compiler-dev
mailing list