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

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

XMLWordPrintable

    • b26
    • generic
    • generic

      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.

            iignatyev Igor Ignatyev (Inactive)
            kvn Vladimir Kozlov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: