From 2562d0da24bb26dad1754aa1dab7b0779b353109 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Tue, 2 Jan 2018 17:37:48 +0100 Subject: Add a test for RETURNDATASIZE/COPY after a revert during a CALLCODE --- .../stRevertTest/RevertInCallCode.json | 20 ++++++++++---------- .../stRevertTest/RevertInCallCodeFiller.json | 22 +++++++++++++++++++--- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/GeneralStateTests/stRevertTest/RevertInCallCode.json b/GeneralStateTests/stRevertTest/RevertInCallCode.json index 3c11d72ea..00cd93f1b 100644 --- a/GeneralStateTests/stRevertTest/RevertInCallCode.json +++ b/GeneralStateTests/stRevertTest/RevertInCallCode.json @@ -2,10 +2,10 @@ "RevertInCallCode" : { "_info" : { "comment" : "", - "filledwith" : "cpp-1.3.0+commit.6e0ce939.Linux.g++", - "lllcversion" : "Version: 0.4.18-develop.2017.9.25+commit.a72237f2.Linux.g++", + "filledwith" : "cpp-1.3.0+commit.97bd859a.Linux.g++", + "lllcversion" : "Version: 0.4.20-develop.2017.12.6+commit.c2109436.Linux.g++", "source" : "src/GeneralStateTestsFiller/stRevertTest/RevertInCallCodeFiller.json", - "sourceHash" : "87c0e9f820265abc94ccb3a126d35a1f3232b99ae84b795e583d23653edf9763" + "sourceHash" : "43ffbd2d024dd0f7462c917497330241ce2f916f950a32b2efc6b865c4ec8674" }, "env" : { "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -18,7 +18,7 @@ "post" : { "Byzantium" : [ { - "hash" : "0xb471d7bbc61e3b9246874114acdb0e35f2353d997f7809bf891b0ec0118672e9", + "hash" : "0x0f38e0e2cc33a2abd0b97e4197a31a188151562534ab266f0acfd188738b0369", "indexes" : { "data" : 0, "gas" : 0, @@ -29,7 +29,7 @@ ], "EIP150" : [ { - "hash" : "0x5a58b2b1f98436fd18eb08bb97fcd859ca347ea705a893488129df1c3f59fe9a", + "hash" : "0xcd1babb6fa6924e281d01bd87289c9afd7b2e181bb16f36296a48c52aeabdd1a", "indexes" : { "data" : 0, "gas" : 0, @@ -40,7 +40,7 @@ ], "EIP158" : [ { - "hash" : "0x5a58b2b1f98436fd18eb08bb97fcd859ca347ea705a893488129df1c3f59fe9a", + "hash" : "0xcd1babb6fa6924e281d01bd87289c9afd7b2e181bb16f36296a48c52aeabdd1a", "indexes" : { "data" : 0, "gas" : 0, @@ -51,7 +51,7 @@ ], "Frontier" : [ { - "hash" : "0x407e07256a3144212d2bb65d284f5188f5382d8089399a0f7e1edcc732e4d6b6", + "hash" : "0xcd1babb6fa6924e281d01bd87289c9afd7b2e181bb16f36296a48c52aeabdd1a", "indexes" : { "data" : 0, "gas" : 0, @@ -62,7 +62,7 @@ ], "Homestead" : [ { - "hash" : "0x407e07256a3144212d2bb65d284f5188f5382d8089399a0f7e1edcc732e4d6b6", + "hash" : "0xcd1babb6fa6924e281d01bd87289c9afd7b2e181bb16f36296a48c52aeabdd1a", "indexes" : { "data" : 0, "gas" : 0, @@ -75,14 +75,14 @@ "pre" : { "0x1000000000000000000000000000000000000000" : { "balance" : "0x03e8", - "code" : "0x60406000604060006103e873945304eb96065b2a98b57a48a06ae28d285a71b561c350f2600055", + "code" : "0x60406000604060006103e873945304eb96065b2a98b57a48a06ae28d285a71b561c350f26000553d6001556020600060403e604051600255", "nonce" : "0x00", "storage" : { } }, "0x945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "0x00", - "code" : "0x60006000fd", + "code" : "0x61223260005260206000fd", "nonce" : "0x00", "storage" : { } diff --git a/src/GeneralStateTestsFiller/stRevertTest/RevertInCallCodeFiller.json b/src/GeneralStateTestsFiller/stRevertTest/RevertInCallCodeFiller.json index ef3cbf743..1b8019865 100644 --- a/src/GeneralStateTestsFiller/stRevertTest/RevertInCallCodeFiller.json +++ b/src/GeneralStateTestsFiller/stRevertTest/RevertInCallCodeFiller.json @@ -15,26 +15,42 @@ "gas" : -1, "value" : -1 }, - "network" : "ALL", + "network" : ["Frontier", "Homestead", "EIP150", "EIP158"], "result" : { "1000000000000000000000000000000000000000" : { "storage" : { } } } + }, + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : "Byzantium", + "result" : { + "1000000000000000000000000000000000000000" : { + "storage" : { + "0x01" : "0x20", + "0x02" : "0x2232" + } + } + } } ], "pre" : { "1000000000000000000000000000000000000000" : { "balance" : "1000", - "code" : "{ [[ 0 ]] (CALLCODE 50000 0x945304eb96065b2a98b57a48a06ae28d285a71b5 1000 0 64 0 64 )}", + "code" : "{ [[ 0 ]] (CALLCODE 50000 0x945304eb96065b2a98b57a48a06ae28d285a71b5 1000 0 64 0 64 ) [[ 1 ]] (RETURNDATASIZE) (RETURNDATACOPY 64 0 32) [[ 2 ]] (MLOAD 64) }", "nonce" : "0", "storage" : { } }, "945304eb96065b2a98b57a48a06ae28d285a71b5" : { "balance" : "0", - "code" : "{ (REVERT 0 0) }", + "code" : "{ (MSTORE 0 0x2232) (REVERT 0 32) }", "nonce" : "0", "storage" : { } -- cgit v1.2.3