-
-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openjdk@11 openjdk@17: use llvm
to avoid Apple clang 16 failure
#190873
base: master
Are you sure you want to change the base?
Conversation
7458605
to
bbac857
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Does their build have any default -O
flags (in release mode?) that get set without arg refurbishment?
Yeah they use all args. Slightly cautious doing this given we could just use the Sonoma bottle that works fine on a faster optimisation. Idea in the other PR was to try report this to Apple so that it can be fixed before Sonoma Xcode support ends in (usually) December, so getting a bug report in soon will give us the best chance of that ahead of branch freezes they'll likely have (Swift 6.0.1 is already branched). If we want to push ahead anyway: can we at least do a benchmark between the two? |
On side note,
Can try backporting openjdk/jdk21u@64c0c0e to see if it behaves closer to JDK 21 |
Alternatively, we could use inreplace "src/hotspot/os_cpu/bsd_aarch64/pauth_bsd_aarch64.inline.hpp" do |s|
s.sub! "#include <ptrauth.h>", ""
s.sub! "return ptrauth_strip(ptr, ptrauth_key_asib);", "return ptr;"
end Related: openjdk/jdk@6fab8a2 |
Seems reasonable, since I think pointer authentication is only done on If I'm misinformed about this being a no-op on |
This works for JDK 17 but JDK 11 still fails at same BUILD_JIGSAW_TOOLS step. Could be some fixes that went in between those versions. |
JDK11 seems to be worse off than JDK17+ by triggering UB with misaligned pointers. Avoiding some inlining seems to be a workaround, e.g. from FreeBSD: battleblow/jdk11u@305a68a (interestingly, this was an issue since Clang 13. maybe not hit from shim override of |
Does the latest JDK trigger any UB (given we're seeing similar miscompiles with that)? |
bbac857
to
cef8cf6
Compare
There is UB. Some have been reported upstream. Snippet of last few using Apple Clang are:
Latest LLVM Clang also outputs similar UB. |
-O1
on Sequoiallvm
to avoid Apple clang 16 failure
Also unbundle `freetype` on macOS
Also unbundle `freetype` on macOS
cef8cf6
to
caa11ba
Compare
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?