RFR: 8355698: JDK not supporting sleef could cause exception at runtime after JDK-8353786
Hamlin Li
mli at openjdk.org
Wed Apr 30 19:46:26 UTC 2025
On Tue, 29 Apr 2025 22:22:19 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> Can you point me, please, to the relevant parts of the discussions? I wasn't part of them.
Sorry, I can not find out this specific answer for you, as there were too long discussion there, the whole process took several months.
> Both SVML and SLEEF-based vector math native libraries are built and bundled with the JDK. JDK is in full control of their sources and should be able to rely on the exact API they expose.
Seems both jdk vendors and jdk end users don't have a full control of the environment to opposite sides.
> exposes bugs (missing entries, naming mismatches between JDK and vector math library);
It's arguable if missing entries is a bug, please check [JDK-8355656](https://bugs.openjdk.org/browse/JDK-8355656) for example
> enables future evolution towards jextract-based automatic Java API extraction (based on library header files)
I'm not familar with this feature, but could it be simple to catch a missing API, then do some necessary things?
> API variability complicates things, so should be avoided unless there are compelling reasons to justify it. Can you summarize, please, what's the motivation behind such behavior?
One advantage of it is fault tolerance, please check [JDK-8355656](https://bugs.openjdk.org/browse/JDK-8355656) for example. And I don't think this compliates things.
> If build platform doesn't fully satisfy library requirements, the library can be excluded.
Does [JDK-8355656](https://bugs.openjdk.org/browse/JDK-8355656) fall in the above scenario? Why should we exclude the whole library when only part of the library is not supported?
After all we does not support TANH on riscv and arm for now.
In summary, I'm concerned that there could always be some potential issue, and we should consider to make it fall back when we could, as after a jdk release to end users it's out of your control. If we want to consider these things ( like missing entries as bugs, we still could do it in other ways (like checking the log in a test), rather than totally stop the jdk to run in end users' environment.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24914#issuecomment-2841606017
More information about the hotspot-dev
mailing list