Skip to content

[mlir] Add tests for Update checks in ABI decode#86

Merged
vladimirradosavljevic merged 5 commits intomainfrom
mlir_update_checks_in_abi_decode
Mar 18, 2026
Merged

[mlir] Add tests for Update checks in ABI decode#86
vladimirradosavljevic merged 5 commits intomainfrom
mlir_update_checks_in_abi_decode

Conversation

@vladimirradosavljevic
Copy link
Copy Markdown
Contributor

solx-llvm PR.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/*.sol FileCheck expectations to assert new bounds/validation logic in generated MLIR (e.g., 64-bit length caps and new revert paths).
  • Updated invalid-abi.sol semantic expectations and added new failing cases to exercise invalid calldata array stride/offset handling.
  • Added a new semantic test abi-decode-string-tail-cleanup.sol to 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>
@vladimirradosavljevic vladimirradosavljevic force-pushed the mlir_update_checks_in_abi_decode branch from 2d3cbe3 to 8413b91 Compare March 18, 2026 09:47
Copy link
Copy Markdown
Contributor

@PavelKopyl PavelKopyl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@vladimirradosavljevic vladimirradosavljevic merged commit da44b02 into main Mar 18, 2026
2 checks passed
@vladimirradosavljevic vladimirradosavljevic deleted the mlir_update_checks_in_abi_decode branch March 18, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants