Fix ICE when assigning calldata Struct with external function type member to storage variable. - #16764
#16764Open
matheusaaguiar wants to merge 2 commits into
developargotorg/solidity:developfrom
fix-ice-copy-struct-function-type-member-copy-calldata-to-storageargotorg/solidity:fix-ice-copy-struct-function-type-member-copy-calldata-to-storageCopy head branch name to clipboard
Open
Fix ICE when assigning calldata Struct with external function type member to storage variable.#16764matheusaaguiar wants to merge 2 commits intodevelopargotorg/solidity:developfrom fix-ice-copy-struct-function-type-member-copy-calldata-to-storageargotorg/solidity:fix-ice-copy-struct-function-type-member-copy-calldata-to-storageCopy head branch name to clipboard
matheusaaguiar wants to merge 2 commits into
developargotorg/solidity:developfrom
fix-ice-copy-struct-function-type-member-copy-calldata-to-storageargotorg/solidity:fix-ice-copy-struct-function-type-member-copy-calldata-to-storageCopy head branch name to clipboard
Conversation
matheusaaguiar
force-pushed
the
fix-ice-copy-struct-function-type-member-copy-calldata-to-storage
branch
from
May 22, 2026 22:20
03cb6af to
55d0c56
Compare
matheusaaguiar
requested review from
cameel,
clonker,
nikola-matic,
r0qs and
rodiazet
June 18, 2026 13:05
matheusaaguiar
force-pushed
the
fix-ice-copy-struct-function-type-member-copy-calldata-to-storage
branch
from
June 18, 2026 13:07
55d0c56 to
0a3f7a4
Compare
|
This pull request is stale because it has been open for 14 days with no activity. |
| <?isValueType> | ||
| <memberValues> := <read>(<memberValues>) | ||
| </isValueType> | ||
| <?dynamicallyEncodedMember> |
Contributor
There was a problem hiding this comment.
I don't think you even had to restructure it this much, could have just move the top portion (based on whether it's dynamically encoded or not) below the "is value type -> let := (memberSrcPtr)", i.e.
<?fromCalldata>
<?isValueType>
let <memberValues> := <read>(memberSrcPtr)
<!isValueType>
let <memberValues> :=
<?dynamicallyEncodedMember>
<accessCalldataTail>(value, memberSrcPtr)
<!dynamicallyEncodedMember>
memberSrcPtr
</dynamicallyEncodedMember>
</isValueType>
</fromCalldata>
Would have made for an easier diff I'd say, but your implementation is semantically equivalent, so no biggie.
| * General: Remove support for the experimental EOF (EVM Object Format) backend. | ||
|
|
||
| Bugfixes: | ||
| * Codegen: Fix ICE when assigning a calldata struct containing a member of external function type to a storage struct. |
Contributor
There was a problem hiding this comment.
Gonna have to move this up into 0.8.37.
Contributor
There was a problem hiding this comment.
I would add a few more tests:
- struct with external function ptr + uint64 (packing)
- struct with external function ptr + uint256[] array (dynamic)
- array of structs with external function ptr, i.e.
contract C {
S[] storageStruct;
....
}
matheusaaguiar
force-pushed
the
fix-ice-copy-struct-function-type-member-copy-calldata-to-storage
branch
from
July 16, 2026 00:17
0a3f7a4 to
6fff259
Compare
…unction member to storage
…r from calldata to storage
matheusaaguiar
force-pushed
the
fix-ice-copy-struct-function-type-member-copy-calldata-to-storage
branch
2 times, most recently
from
July 17, 2026 20:52
62d0bde to
b6deae8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #16717.