7123910: Some CTW tests crash VM: is_loaded() && that->is_loaded()

Thu, 26 Jan 2012 09:38:28 +0100

author
roland
date
Thu, 26 Jan 2012 09:38:28 +0100
changeset 3450
9a28ddfc1f4a
parent 3449
94f0ce74d48e
child 3451
5dbed2f542ff

7123910: Some CTW tests crash VM: is_loaded() && that->is_loaded()
Summary: handle not loaded array klass in Parse::do_checkcast().
Reviewed-by: kvn, never

src/share/vm/opto/parseHelper.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/opto/parseHelper.cpp	Wed Jan 25 08:10:04 2012 -0800
     1.2 +++ b/src/share/vm/opto/parseHelper.cpp	Thu Jan 26 09:38:28 2012 +0100
     1.3 @@ -71,14 +71,14 @@
     1.4    // Throw uncommon trap if class is not loaded or the value we are casting
     1.5    // _from_ is not loaded, and value is not null.  If the value _is_ NULL,
     1.6    // then the checkcast does nothing.
     1.7 -  const TypeInstPtr *tp = _gvn.type(obj)->isa_instptr();
     1.8 -  if (!will_link || (tp && !tp->is_loaded())) {
     1.9 +  const TypeOopPtr *tp = _gvn.type(obj)->isa_oopptr();
    1.10 +  if (!will_link || (tp && tp->klass() && !tp->klass()->is_loaded())) {
    1.11      if (C->log() != NULL) {
    1.12        if (!will_link) {
    1.13          C->log()->elem("assert_null reason='checkcast' klass='%d'",
    1.14                         C->log()->identify(klass));
    1.15        }
    1.16 -      if (tp && !tp->is_loaded()) {
    1.17 +      if (tp && tp->klass() && !tp->klass()->is_loaded()) {
    1.18          // %%% Cannot happen?
    1.19          C->log()->elem("assert_null reason='checkcast source' klass='%d'",
    1.20                         C->log()->identify(tp->klass()));

mercurial