RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]
Andrew Haley
aph at openjdk.org
Tue Oct 25 15:02:48 UTC 2022
On Tue, 25 Oct 2022 14:46:57 GMT, Florian Weimer <fweimer at openjdk.org> wrote:
> Sorry, I feel like this has gone a bit off track. It started as some hardening for `loadLibrary`, but now it's about making all JNI calls a bit slower? Is there any data to suggest that this is necessary?
>
> Would it be possible to capture some FPU state evidence in crash dumps, as an alternative?
Really? The problem is that when certain libraries are loaded, we get silently corrupted results. Vladimir Ivanov pointed out that the weakness applies to any JNI call, and we wondered if it might be possible to make the workaround so cheap that we could leave it on by default. IMVHO we probably could: the additional overhead is about 1-1.5ns. The only way to measure it is carefully written tests against a JNI call that does nothing.
-------------
PR: https://git.openjdk.org/jdk/pull/10661
More information about the build-dev
mailing list