[mlir] Add tests for Update checks in ABI decode#86
Merged
vladimirradosavljevic merged 5 commits intomainfrom Mar 18, 2026
Merged
[mlir] Add tests for Update checks in ABI decode#86vladimirradosavljevic merged 5 commits intomainfrom
vladimirradosavljevic merged 5 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the MLIR-based Solidity/EVM test suite to cover additional ABI decode validation paths (notably “update checks” around calldata array stride/offset and length bounds), and adds a targeted regression test for string tail cleanup after abi.decode.
Changes:
- Expanded multiple
test/lit/mlirCodegen/EVM/*.solFileCheck expectations to assert new bounds/validation logic in generated MLIR (e.g., 64-bit length caps and new revert paths). - Updated
invalid-abi.solsemantic expectations and added new failing cases to exercise invalid calldata array stride/offset handling. - Added a new semantic test
abi-decode-string-tail-cleanup.solto ensure string decoding clears/pads tail bytes deterministically.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/lit/mlirCodegen/EVM/storage-string.sol | Updates FileCheck expectations to match new ABI decode checks and added constants/revert paths. |
| test/lit/mlirCodegen/EVM/erc20.sol | Updates FileCheck expectations for new length/stride/offset validation behavior in generated MLIR. |
| test/lit/mlirCodegen/EVM/calldata-bytes.sol | Updates FileCheck expectations to include new validation/revert blocks and constants. |
| test/lit/mlirCodegen/EVM/bool-cleanup.sol | Updates FileCheck expectations to reflect new ABI decode validation and memory handling sequences. |
| test/lit/mlirCodegen/EVM/abi-encode-array-head-size.sol | Updates FileCheck expectations to cover additional validation paths during encoding/looped writes. |
| test/libsolidity/semanticTests/mlir/invalid-abi.sol | Adds a new failing case and updates expected revert reasons/lengths for ABI decode errors. |
| test/libsolidity/semanticTests/mlir/abi-decode-string-tail-cleanup.sol | New semantic regression test ensuring decoded string tail is zeroed/padded as expected. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…nd string types Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
…decode Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
…uring ABI decoding Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
2d3cbe3 to
8413b91
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.
solx-llvm PR.