-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed as not planned
Labels
closed due inactivityThe issue/PR was automatically closed due to inactivity.The issue/PR was automatically closed due to inactivity.staleThe issue/PR was marked as stale because it has been open for too long.The issue/PR was marked as stale because it has been open for too long.wasm
Description
While implementing the support of --enforce-compile-to-ewasm #10356 (see #10356 (comment)) it turned out that there is something missing to support test-cases that use revert strings that differ from RevertString::Default.
I didn't investigated this further. I created this issue to don't forget about this.
semanticTests/revertStrings/short_input_bytes.sol: FAIL
Contract:
pragma abicoder v2;
contract C {
function e(bytes memory a) public pure returns (uint) { return 7; }
}
// ====
// EVMVersion: >=byzantium
// compileToEwasm: also
// compileViaYul: also
// revertStrings: debug
Expected result:
// e(bytes): 0x20, 7 -> FAILURE, 3963877391197344453575983046348115674221700746820753546331534351508065746944, 862718293348820473429344482784628181556388621521298319395315527974912, 0x27414249206465636f64696e673a20696e76616c696420627974652061, 51765758038840874448248112245855622722229435958027532839407121884968680161280, 7879764993205877706498670012939534695854369295326189278
Obtained result:
// e(bytes): 0x20, 7 -> FAILURE, 3963877391197344453575983046348115674221700746820753546331534351508065746944, 862718293348820473429344482784628181556388621521298319395315527974912, 0x27414249206465636f64696e673a20696e76616c696420627974652061, 51765758038840874448248112245855622722229435958027532839407121884968680161280, 26857514009908594198673637516307065083938733454080333298916016612289
Warning: The call to "e(bytes)" returned
[8,c3,79,a0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,27,41,42,49,20,64,65,63,6f,64,69,6e,67,3a,20,69,6e,76,61,6c,69,64,20,62,79,74,65,20,61]
[72,72,61,79,20,6c,65,6e,67,74,68,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,0,0,0,0,0,9c,ba,37,c1,ff,7,9,0,60,93,72,13,fc,7f,0,0,de,62,6e,d,a3,69,0,19]
Attention: Updates on the test will apply the detected format displayed.
semanticTests/revertStrings/calldata_array_dynamic_invalid.sol: FAIL
Contract:
pragma abicoder v2;
contract C {
function f(uint256[][] calldata a) external returns (uint) {
return 42;
}
}
// ====
// EVMVersion: >=byzantium
// compileToEwasm: also
// compileViaYul: also
// revertStrings: debug
Expected result:
// f(uint256[][]): 0x20, 1 -> FAILURE, 3963877391197344453575983046348115674221700746820753546331534351508065746944, 862718293348820473429344482784628181556388621521298319395315527974912, 0x2b414249206465636f64696e673a20696e76616c69642063616c6c6461, 52639898083992983106342913290719799829523823861698573317707643453664495927296, 705839291290523792873459887657190650735835219328756789280768
Obtained result:
// f(uint256[][]): 0x20, 1 -> FAILURE, 3963877391197344453575983046348115674221700746820753546331534351508065746944, 862718293348820473429344482784628181556388621521298319395315527974912, 0x2b414249206465636f64696e673a20696e76616c69642063616c6c6461, 52639898083992983106342913290719799829523823861698573317707643453664495927296, 26857514011655642856704942381947475400083356999719558281220887412736
Warning: The call to "f(uint256[][])" returned
[8,c3,79,a0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,2b,41,42,49,20,64,65,63,6f,64,69,6e,67,3a,20,69,6e,76,61,6c,69,64,20,63,61,6c,6c,64,61]
[74,61,20,61,72,72,61,79,20,73,74,72,69,64,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,0,0,7,0,a0,79,52,32,c1,ff,7,9,0,90,3b,2e,13,fc,7f,0,0,a8,5d,dc,d8,7f,b1,4d,b5]
Metadata
Metadata
Assignees
Labels
closed due inactivityThe issue/PR was automatically closed due to inactivity.The issue/PR was automatically closed due to inactivity.staleThe issue/PR was marked as stale because it has been open for too long.The issue/PR was marked as stale because it has been open for too long.wasm