8006109: test/java/util/AbstractSequentialList/AddAll.java fails: assert(rtype == ctype) failed: mismatched return types

Tue, 15 Jan 2013 12:06:18 -0800

author
twisti
date
Tue, 15 Jan 2013 12:06:18 -0800
changeset 4447
f1de9dbc914e
parent 4446
d92fa52a5d03
child 4448
5b8548391bf3

8006109: test/java/util/AbstractSequentialList/AddAll.java fails: assert(rtype == ctype) failed: mismatched return types
Reviewed-by: kvn

src/share/vm/ci/ciType.cpp file | annotate | diff | comparison | revisions
src/share/vm/ci/ciType.hpp file | annotate | diff | comparison | revisions
src/share/vm/opto/doCall.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/ci/ciType.cpp	Mon Jan 14 08:22:32 2013 -0800
     1.2 +++ b/src/share/vm/ci/ciType.cpp	Tue Jan 15 12:06:18 2013 -0800
     1.3 @@ -60,6 +60,19 @@
     1.4  }
     1.5  
     1.6  // ------------------------------------------------------------------
     1.7 +// ciType::name
     1.8 +//
     1.9 +// Return the name of this type
    1.10 +const char* ciType::name() {
    1.11 +  if (is_primitive_type()) {
    1.12 +    return type2name(basic_type());
    1.13 +  } else {
    1.14 +    assert(is_klass(), "must be");
    1.15 +    return as_klass()->name()->as_utf8();
    1.16 +  }
    1.17 +}
    1.18 +
    1.19 +// ------------------------------------------------------------------
    1.20  // ciType::print_impl
    1.21  //
    1.22  // Implementation of the print method.
    1.23 @@ -73,7 +86,8 @@
    1.24  //
    1.25  // Print the name of this type
    1.26  void ciType::print_name_on(outputStream* st) {
    1.27 -  st->print(type2name(basic_type()));
    1.28 +  ResourceMark rm;
    1.29 +  st->print(name());
    1.30  }
    1.31  
    1.32  
     2.1 --- a/src/share/vm/ci/ciType.hpp	Mon Jan 14 08:22:32 2013 -0800
     2.2 +++ b/src/share/vm/ci/ciType.hpp	Tue Jan 15 12:06:18 2013 -0800
     2.3 @@ -77,6 +77,7 @@
     2.4    bool is_type() const                      { return true; }
     2.5    bool is_classless() const                 { return is_primitive_type(); }
     2.6  
     2.7 +  const char* name();
     2.8    virtual void print_name_on(outputStream* st);
     2.9    void print_name() {
    2.10      print_name_on(tty);
     3.1 --- a/src/share/vm/opto/doCall.cpp	Mon Jan 14 08:22:32 2013 -0800
     3.2 +++ b/src/share/vm/opto/doCall.cpp	Tue Jan 15 12:06:18 2013 -0800
     3.3 @@ -553,7 +553,13 @@
     3.4          rtype = ctype;
     3.5        }
     3.6      } else {
     3.7 -      assert(rtype == ctype, "mismatched return types");  // symbolic resolution enforces this
     3.8 +      // Symbolic resolution enforces the types to be the same.
     3.9 +      // NOTE: We must relax the assert for unloaded types because two
    3.10 +      // different ciType instances of the same unloaded class type
    3.11 +      // can appear to be "loaded" by different loaders (depending on
    3.12 +      // the accessing class).
    3.13 +      assert(!rtype->is_loaded() || !ctype->is_loaded() || rtype == ctype,
    3.14 +             err_msg_res("mismatched return types: rtype=%s, ctype=%s", rtype->name(), ctype->name()));
    3.15      }
    3.16  
    3.17      // If the return type of the method is not loaded, assert that the

mercurial