JDK-8223746 : NativeLibLoader should fail fast when loading library with wrong version
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: other
  • Affected Version: openjfx11
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2019-05-11
  • Updated: 2020-06-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Duplicate :  
Relates :  
Description
The JNI interfaces between the Java code and native libraries is not stable, such that a mismatch between the Java code and the native library will result in undefined behavior, often leading to a crash or unexpected exception.

We should include the version number in each of the loaded JNI libraries and "fail fast" if it doesn't match the version of JavaFX from the Java code. Ideally this failure would be detected at load time is such a way that we would consider it a failure to load and try to load the library from another location.

See JDK-8223377 for the motivation for this RFE.
Comments
I agree this can cause problems (like loading any native library with incompatible versions) I am not convinced that using bundled libraries over system libraries is the best order tough. Do you suggest we name the native libraries with the same version as the javafx.version? (e.g. libglass.so.12.0.2)
12-05-2019