Fix ICE for 32-byte hex literals and zero literals in bytes.concat() by disallowing them

This commit is contained in:
Kamil Śliwak
2021-06-29 14:48:42 +02:00
parent 1d1d74bd0e
commit 6a50d088a0
8 changed files with 75 additions and 44 deletions
@@ -1,15 +0,0 @@
contract C {
function f() public returns (bytes memory) {
return bytes.concat(0, -0, 0.0, -0.0, 0e10, 0e-10, 0x00, (0));
}
function g() public returns (bytes memory) {
return bytes.concat(0, "abc", 0, "abc", 0);
}
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 0x20, 8, "\0\0\0\0\0\0\0\0"
// g() -> 0x20, 9, "\0abc\0abc\0"