AOT cache is not rejected when JAR file has changed

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • 27
    • Affects Version/s: 25, 26, 27
    • Component/s: hotspot

      When a JAR file used in the creation of an AOT cache has been modified, the JVM should not used this AOT cache anymore.

      Reproducer:

      Actual: the last command doesn't fail.
      Expected: the last command should fail with the error:

      [0.011s][error][aot] This file is not the one used while building the AOT cache: '/home/iklam/tmp/HelloWorld.jar', timestamp has changed

      ====================

      $ java -cp HelloWorld.jar -XX:AOTCacheOutput=hw.aot HelloWorld
      Hello World
      Temporary AOTConfiguration recorded: hw.aot.config
      Launching child process java to assemble AOT cache hw.aot using configuration hw.aot.config
      Picked up JAVA_TOOL_OPTIONS: -Djava.class.path=HelloWorld.jar -XX:AOTCacheOutput=hw.aot -XX:AOTConfiguration=hw.aot.config -XX:AOTMode=create
      Reading AOTConfiguration hw.aot.config and writing AOTCache hw.aot
      AOTCache creation is complete: hw.aot 10194944 bytes
      Removed temporary AOT configuration file hw.aot.config

      $ java -cp HelloWorld.jar -XX:AOTCache=hw.aot -XX:AOTMode=on HelloWorld
      Hello World

      $ touch HelloWorld.jar
      $ java -cp HelloWorld.jar -XX:AOTCache=hw.aot -XX:AOTMode=on HelloWorld
      Hello World

            Assignee:
            Ioi Lam
            Reporter:
            Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: