C2: NPE in compiled method does not occur with interpreter

XMLWordPrintable

    • b04
    • 27

      Found by Olivier Mattmann <olivier.mattmann@bluewin.ch> during work on this Master thesis where he is working on a fuzzer for C2 (see JDK-8370562).

      Running java-fastdebug -Xbatch -XX:-TieredCompilation TestNpe.java yields an unexpected NPE:
      Exception in thread "main" java.lang.NullPointerException: Cannot read field "c" because "<local1>.b" is null
      at TestNpe.test(TestNpe.java:96)
      at TestNpe.main(TestNpe.java:27)

      However, running java-fastdebug -Xint TestNpe.java does not throw such an exception, hinting at a wrong execution.

      Build search narrowed the causing commit down to JDK-8367627.

            Assignee:
            Benoît Maillard
            Reporter:
            Manuel Hässig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: