-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
superenv: disable ConstraintEliminationPass
on Xcode 16
#18620
Conversation
This can result in build failures (e.g. OpenJDK) and silently miscompile some formulae (e.g. Vim). See Homebrew/homebrew-core#195325.
4cd97df
to
b7fc8d6
Compare
ConstraintEliminiationPass
on Xcode 16ConstraintEliminationPass
on Xcode 16
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.
Looks good, thanks @carlocab!
Isn't that a super heavy-handed fix? We are aware of two formulas where this bug triggers: |
To be clear about the approach I recommend: I suggest enabling the flag for |
Maybe, but the way I see it is: we are trading off between the risk of miscompilation vs the risk of missed optimisations. One is much worse than the other. If that's not actually the tradeoff that we're making, then do correct me, but once you agree that that's the tradeoff then it's hard not to conclude that you'd rather potentially miss some optimisations than potentially miscompile software. As for compilers always having slight optimisation bugs: this is true, but "optimisation bugs" come in many different forms, and not all of those forms result in miscompilation. (Some, maybe most, just lead in code that isn't really faster.) Wherever we're aware of any that result in miscompilation and can do something about it, we probably should. |
I don't think it's just missed optimization, these passes are not strongly tested independently (i.e., most code and most tests just specify one I think the benefit/risk ratio would be different if we had a lot of formulas that crashed or otherwise misbehaved, but we have deployed Sonoma bottles for two months and so far we have found issues in only two cases: openjdk bootstrap, and one very specific code path in vim. |
This seems reasonable to me 👍🏻 |
Implemented in |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Original issue was confirmed fixed in Xcode 16.2 beta 3 (clang-1600.0.26.6), see Homebrew/homebrew-core#195325 (comment) |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?This can result in build failures (e.g. OpenJDK) and silently miscompile
some formulae (e.g. Vim).
See Homebrew/homebrew-core#195325.