Skip to content

Commit 8413b91

Browse files
[mlir] Add tests for Add length guard for dynamic-memory allocation during ABI decoding
Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
1 parent 4e65fe0 commit 8413b91

File tree

7 files changed

+4145
-3693
lines changed

7 files changed

+4145
-3693
lines changed

test/libsolidity/semanticTests/mlir/invalid-abi.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ contract C {
2323
// g(string): 0x10000000000000000 -> FAILURE, hex"08c379a0", 0x20, 0x22, "ABI decoding: invalid tuple offs", "et"
2424
// h(uint256[][]): 32, 2, 0x200, 0xa0, 2, 1, 2, 2, 9, 8 -> FAILURE, hex"08c379a0", 0x20, 0x2b, "ABI decoding: invalid calldata a", "rray offset"
2525
// h(uint256[][]): 32, 1, 0x10000000000000000 -> FAILURE, hex"08c379a0", 0x20, 0x2b, "ABI decoding: invalid calldata a", "rray offset"
26+
// h(uint256[][]): 32, 1, 32, 3618502788666131106986593281521497120414687020801267626233049500247285301248 -> FAILURE, hex"4e487b71", 0x41
2627
// e() -> FAILURE, hex"08c379a0", 0x20, 0x2b, "ABI decoding: invalid calldata a", "rray stride"

test/lit/mlirCodegen/EVM/abi-encode-array-head-size.sol

Lines changed: 376 additions & 354 deletions
Large diffs are not rendered by default.

test/lit/mlirCodegen/EVM/array-decode.sol

Lines changed: 2679 additions & 2367 deletions
Large diffs are not rendered by default.

test/lit/mlirCodegen/EVM/bool-cleanup.sol

Lines changed: 423 additions & 381 deletions
Large diffs are not rendered by default.

test/lit/mlirCodegen/EVM/erc20.sol

Lines changed: 167 additions & 145 deletions
Large diffs are not rendered by default.

test/lit/mlirCodegen/EVM/fn.sol

Lines changed: 408 additions & 367 deletions
Large diffs are not rendered by default.

test/lit/mlirCodegen/EVM/storage-string.sol

Lines changed: 91 additions & 79 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)