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

(ref) runFinalizersOnExit(true) causes VM crash for user native libraries

XMLWordPrintable

    • generic
    • generic

      This is a more general description of the bug reported in 4119554.

      If an application loads a native library and sets the
      runFinalizersOnExit flag to true, the VM will crash
      on exit if there are any objects that have a finalizer
      and the finalizer needs to call a native function in
      the library.

      The reason is apparently that the
      finalizer for the native library classloader unloads the users DLL
      before the object finalizer gets called. When the object finalizer
      is called there is no DLL and hence the crash.

      Test case is attached.

            mchung Mandy Chung (Inactive)
            michaelm Michael McMahon
            Votes:
            0 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: