RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]
Andrew Haley
aph at openjdk.org
Tue Oct 25 15:10:47 UTC 2022
On Tue, 18 Oct 2022 07:46:35 GMT, Florian Weimer <fweimer at openjdk.org> wrote:
> I wonder if something that focuses on diagnostic tools might be better here, particularly if there hasn't been any reported breakage. The `dlopen` protection is of course very incomplete because any JNI call can change the state in unexpected ways.
>
> On the other hand, it seems unlikely that this change breaks some undefined but intended use of the FPU state because if it is changed in `dlopen`, it's not going to be propagated across threads.
Why is that unlikely? `System.loadLibrary` runs on a Java thread. That kinda makes it worse, because arithmetic results are different depending on which thread is in use.
-------------
PR: https://git.openjdk.org/jdk/pull/10661
More information about the build-dev
mailing list