RFR: 8340574: Drop stackMapTable.cpp to -O1 for MacOS on XCode 16 to work around JDK-8340341
Magnus Ihse Bursie
ihse at openjdk.org
Tue Oct 8 13:37:57 UTC 2024
On Sun, 22 Sep 2024 22:26:48 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Personally I think it is foolish to trust this compiler and rather than dropping the optimisation level for the one file we've been lucky enough to know has been compiled incorrectly, we should issue a fatal error if this compiler is used. Downgrade your compilers again and complain en-masse to Apple. This compiler simply cannot be trusted.
While I understand your sentiment, let me just note that this is certainly not the first time compilers generate incorrect code. Almost all hard-coded places where we lower the optimization level for certain files is due to compiler bugs. (A few is because a higher optimization level takes a disproportionate time to compile.) Back in the days when we used Solaris Studio, this kind of work-arounds was abundant. :(
Of course the problem manifesting itself here can happen elsewhere. But it apparently requires some very specific conditions to happen, as shown by the so far failed attempts at getting this down to a simpler reproducer. It also stands to reason that if this were to happen all the time, it would have been discovered by clang/Xcode testing before they released.
I'm not saying we should definitely include this PR, but I want us to view the question a bit more grayscale and less black-and-white.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21119#issuecomment-2399869507
More information about the build-dev
mailing list