-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Inconsistent defaults of optimizeStackAllocation
flag cause ICEs and metadata issues in optimized compilation with Yul optimizer disabled
#15641
Comments
I investigated this today and... it's complicated. The short of it is that we do have a bug here, even more than one, but it's not what it may seem. The ICE is only a symptom. Optimized compilation with Yul optimizer disabled both via CLI and via Standard JSON has apparently been slightly broken since 0.8.8 with regard to stack optimizations. The flag controlling whether they are applied has wrong value in some circumstances. The resulting code is not incorrect, just not necessarily optimized exactly the way that was requested. There are also potential issues with reproducing that exact code by exactly following metadata (CC: @kuzdogan). The full explanation is long so I'll post it in a separate comment below. |
The situation is complicated because there are multiple interdependent bugs here and in the meantime we had a PR that turned buggy behavior into the expected behavior. I think it will be the easiest to understand what happened if describe how this functionality was modified over time:
How serious is the problem?
What do we need to do to fix it?
|
@r0qs Pointed out that
It's still possible to toggle the flag with optimizer enabled and sequence set to Good, one less harmful consequence of this. I updated my assessment above accordingly. |
optimizeStackAllocation
flag cause ICEs and metadata issues in optimized compilation with Yul optimizer disabled
Environment
Steps to Reproduce
A fairly simple code named a.sol
The help message shows two points:
I try command
and i get
this is consistent with the 1st point
and then i try command
the compilation crashes at this time
According to the 2nd point, I should get the same or similar error as before, but here it crashes for some reason
The text was updated successfully, but these errors were encountered: