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

compiler/intrinsics/classcast/NullCheckDroppingsTest.java testVarClassCast() can fail

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9, 10, 11, 12, 13
    • Fix Version/s: 14
    • Component/s: hotspot
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      On 5/18/15 6:56 AM, Andrew Haley wrote:
      > This test has been failing with a failed assertion:
      >
      > Exception in thread "main" java.lang.AssertionError: void NullCheckDroppingsTest.testVarClassCast(java.lang.String) was not deoptimized
      > at NullCheckDroppingsTest.checkDeoptimization(NullCheckDroppingsTest.java:331)
      > at NullCheckDroppingsTest.runTest(NullCheckDroppingsTest.java:309)
      > at NullCheckDroppingsTest.main(NullCheckDroppingsTest.java:125)
      >
      > It seems that the reason for the failure is that the nmethod for a
      > deoptimized method (testVarClassCast) is not removed. This is
      > perfectly correct because when testVarClassCast() was trapped, it was
      > with an action of Deoptimization::Action_maybe_recompile. When this
      > occurs, a method is not marked as dead and continues to be invoked, so
      > the test WhiteBox.isMethodCompiled() will still return true.
      >
      > Therefore, I think this code in checkDeoptimization is incorrect:
      >
      > // Check deoptimization event (intrinsic Class.cast() works).
      > if (WHITE_BOX.isMethodCompiled(method) == deopt) {
      > throw new AssertionError(method + " was" + (deopt ? " not" : "") + " deoptimized");
      > }
      >
      > We either need some code in WhiteBox to check for a deoptimization
      > event properly or we should just remove this altogether.
      >
      > So, thoughts? Just delete the check?
      >
      > Andrew.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                iignatyev Igor Ignatyev
                Reporter:
                kvn Vladimir Kozlov
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: