Harmony
  1. Harmony
  2. HARMONY-248

[classlib][luni] Using java.io.File.deleteOnExit() and System.runFinalizersOnExit(true) in the same application causes crash on exit.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None
    • Environment:
      WinXP
    • Estimated Complexity:
      Moderate

      Description

      The dreaded sequel to HARMONY-222. While the one line fix for that prevents the test suite bringing about a rather undignified exit to the VM it doesn't really address the bigger picture of how to cope with user code that marks files as delete-on-exit and also makes use of the System.runFinalizersOnExit() method. Of course the latter method is deprecated but it won't stop some people from adopting it in their code.

      I will attach a test case for dropping into tests/api/java/io/FileTest.java together with some minor tweaks to the build.xml and hyproperties.xml files in modules/luni/make/common that will enable this new test to run. A new support class will also be needed to help run part of the test in a separate VM.

      My suggested fix for this is an update to one class in icu4jni-3.4.jar. I think that we are OK customising that jar for Harmony.

      Best regards,
      George

      1. Harmony-248.txt
        4 kB
        George Harley
      2. Support_DeleteOnExitWithRunFinalizersOnExitTest.java
        0.9 kB
        George Harley
      3. icu4jni-3.4.jar
        228 kB
        George Harley

        Activity

        George Harley created issue -
        George Harley made changes -
        Field Original Value New Value
        Attachment Harmony-248.txt [ 12324558 ]
        George Harley made changes -
        George Harley made changes -
        Attachment icu4jni-3.4.jar [ 12324560 ]
        Alexei Zakharov made changes -
        Summary Using java.io.File.deleteOnExit() and System.runFinalizersOnExit(true) in the same application causes crash on exit. [classlib][luni] Using java.io.File.deleteOnExit() and System.runFinalizersOnExit(true) in the same application causes crash on exit.
        Tim Ellison made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Cannot Reproduce [ 5 ]
        Assignee Tim Ellison [ tellison ]

          People

          • Assignee:
            Tim Ellison
            Reporter:
            George Harley
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development