mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
7123910: Some CTW tests crash VM: is_loaded() && that->is_loaded()
Handle not loaded array klass in Parse::do_checkcast(). Reviewed-by: kvn, never
This commit is contained in:
parent
51e16a559d
commit
de3ed511b1
1 changed files with 3 additions and 3 deletions
|
@ -71,14 +71,14 @@ void Parse::do_checkcast() {
|
||||||
// Throw uncommon trap if class is not loaded or the value we are casting
|
// Throw uncommon trap if class is not loaded or the value we are casting
|
||||||
// _from_ is not loaded, and value is not null. If the value _is_ NULL,
|
// _from_ is not loaded, and value is not null. If the value _is_ NULL,
|
||||||
// then the checkcast does nothing.
|
// then the checkcast does nothing.
|
||||||
const TypeInstPtr *tp = _gvn.type(obj)->isa_instptr();
|
const TypeOopPtr *tp = _gvn.type(obj)->isa_oopptr();
|
||||||
if (!will_link || (tp && !tp->is_loaded())) {
|
if (!will_link || (tp && tp->klass() && !tp->klass()->is_loaded())) {
|
||||||
if (C->log() != NULL) {
|
if (C->log() != NULL) {
|
||||||
if (!will_link) {
|
if (!will_link) {
|
||||||
C->log()->elem("assert_null reason='checkcast' klass='%d'",
|
C->log()->elem("assert_null reason='checkcast' klass='%d'",
|
||||||
C->log()->identify(klass));
|
C->log()->identify(klass));
|
||||||
}
|
}
|
||||||
if (tp && !tp->is_loaded()) {
|
if (tp && tp->klass() && !tp->klass()->is_loaded()) {
|
||||||
// %%% Cannot happen?
|
// %%% Cannot happen?
|
||||||
C->log()->elem("assert_null reason='checkcast source' klass='%d'",
|
C->log()->elem("assert_null reason='checkcast source' klass='%d'",
|
||||||
C->log()->identify(tp->klass()));
|
C->log()->identify(tp->klass()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue