Fix calldata handling during creation in EVMHost.

This commit is contained in:
Daniel Kirchner
2023-04-18 12:53:50 +02:00
parent 02e936ad82
commit 421738b50d
2 changed files with 19 additions and 0 deletions
@@ -0,0 +1,14 @@
contract C {
bytes public s;
constructor(uint256 x) {
// Due to a bug in EVMHost, msg.data used to contain initcode and constructor arguments.
s = msg.data;
assert(msg.data.length == 0);
}
}
// ----
// constructor(): 42 ->
// gas irOptimized: 147541
// gas legacy: 177488
// gas legacyOptimized: 140089
// s() -> 0x20, 0