-
Bug
-
Resolution: Duplicate
-
P3
-
1.2.0, 5.0, 8, 9
-
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.
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.
- duplicates
-
JDK-4238486 finalize() calling native function results in JVM crash
-
- Closed
-
- relates to
-
JDK-4127306 System.exit does not exit when runFinalizersOnExit(true)
-
- Closed
-
-
JDK-5086661 JDK 1.5's temporary native libraries may not be deleted on VM exit
-
- Closed
-
-
JDK-8198249 Remove deprecated Runtime::runFinalizersOnExit and System::runFinalizersOnExit
-
- Resolved
-
-
JDK-8183526 Refactor java/lang/System/finalization/FinExit.sh to java
-
- Closed
-