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

Incorrect OOM thrown from the UncaughtExceptionHandler after deoptimization

XMLWordPrintable

      When running new test TestNestedRelockAtDeopt.java from JDK-8324174 with default flags, it exits early with OOM exception thrown:

      > java -Xmx128m TestNestedRelockAtDeopt
      OOM caught in test1
      Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"

      It is incorrect since the test should catch all OOM exception:

      > java -Xmx128m -Xint TestNestedRelockAtDeopt
      OOM caught in test1
      OOM caught in test2
      OOM caught in test3
      OOM caught in test4

      OOM could be thrown during deoptimization when scalarized object is re-allocated and re-locked. But we should handle such case gracefully after fix JDK-6898462.

      Other JDK releases may be also affected but without JDK-8324174 fix it is hard to tell.

            kvn Vladimir Kozlov
            kvn Vladimir Kozlov
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: