-
Bug
-
Resolution: Fixed
-
P3
-
11, 13
-
b25
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8226097 | 14 | Vladimir Kozlov | P3 | Resolved | Fixed | team |
Erik Osterlund wrote:
The JVMCIEnv::get_jvmci_type() function has the following block of code:
#ifdef INCLUDE_ALL_GCS
if (UseG1GC) {
// The klass might have come from a weak location so enqueue
// the Class to make sure it's noticed by G1
G1SATBCardTableModRefBS::enqueue(klass()->java_mirror());
}
#endif // Klass* don't require tracking as Metadata*
This serves the purpose of keeping the Klass alive so that the handle may be used safely. However, the INCLUDE_ALL_GCS does not exist in jdk13, and therefore, the ifdef block will not be embedded into the binary. In fact, the G1SATBCardTableModRefBS class does not exist either. Nowadays, rather than explicitly enqueueing things for G1, we use the Access API to keep things alive. So the JVMCI adaptation to jdk13 needs to adapt to that. As a result, classes are not kept alive, leading to crashes.
The JVMCIEnv::get_jvmci_type() function has the following block of code:
#ifdef INCLUDE_ALL_GCS
if (UseG1GC) {
// The klass might have come from a weak location so enqueue
// the Class to make sure it's noticed by G1
G1SATBCardTableModRefBS::enqueue(klass()->java_mirror());
}
#endif // Klass* don't require tracking as Metadata*
This serves the purpose of keeping the Klass alive so that the handle may be used safely. However, the INCLUDE_ALL_GCS does not exist in jdk13, and therefore, the ifdef block will not be embedded into the binary. In fact, the G1SATBCardTableModRefBS class does not exist either. Nowadays, rather than explicitly enqueueing things for G1, we use the Access API to keep things alive. So the JVMCI adaptation to jdk13 needs to adapt to that. As a result, classes are not kept alive, leading to crashes.
- backported by
-
JDK-8226097 JVMCIEnv::get_jvmci_type does not keep klasses alive
- Resolved