Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8202465

C1: Casts should not be eliminated for interface types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 11
    • 10, 11
    • hotspot
    • b13

    Description

      From the review for JDK-8200167, Vladimir writes:

      src/hotspot/share/c1/c1_Canonicalizer.cpp
      ...
       void Canonicalizer::do_CheckCast (CheckCast* x) {
      - if (x->klass()->is_loaded()) {
      + if (x->klass()->is_loaded() && !x->is_invokespecial_receiver_check())

      It seems like it's not something specific to invokespecial, but a generic problem in how interface casts are handled in C1: it's not correct to eliminate the cast if obj->declared_type() is an interface. I assume that's what happens in your case. FTR I'm fine with handling it separately.

      Attachments

        Issue Links

          Activity

            People

              vlivanov Vladimir Ivanov
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: