Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert(OutOfBounds): stMemoryTest/memCopySelf #1474

Open
lima-limon-inc opened this issue Dec 11, 2024 · 2 comments · May be fixed by #1506
Open

Revert(OutOfBounds): stMemoryTest/memCopySelf #1474

lima-limon-inc opened this issue Dec 11, 2024 · 2 comments · May be fixed by #1506
Labels
levm Lambda EVM implementation

Comments

@lima-limon-inc
Copy link
Contributor

lima-limon-inc commented Dec 11, 2024

There is a Revert(OutOfBounds) when there should be a success.

Here's the code that the test executes:

[00]    PUSH1	04
[02]	PUSH1	00
[04]	JUMPDEST	
[05]	PUSH1	0f
[07]	DUP2	
[08]	LT	
[09]	PUSH1	30
[0b]	JUMPI	
[0c]	PUSH1	0a
[0e]	PUSH1	02
[10]	DUP2	
[11]	PUSH1	00
[13]	DUP1	
[14]	DUP7	
[15]	DUP2	
[16]	MLOAD	
[17]	DUP3	
[18]	SSTORE	
[19]	GAS	
[1a]	CALL	
[1b]	POP	
[1c]	PUSH1	00
[1e]	MLOAD	
[1f]	PUSH1	01
[21]	SSTORE	
[22]	PUSH1	0a
[24]	PUSH1	00
[26]	PUSH1	20
[28]	RETURNDATACOPY	
[29]	PUSH1	20
[2b]	MLOAD	
[2c]	PUSH1	02
[2e]	SSTORE	
[2f]	STOP	
[30]	JUMPDEST	
[31]	DUP1	
[32]	PUSH1	11
[34]	PUSH1	01
[36]	DUP1	
[37]	SWAP4	
[38]	ADD	
[39]	MUL	
[3a]	DUP2	
[3b]	MSTORE8	
[3c]	ADD	
[3d]	PUSH1	04
[3f]	JUMP	
@lima-limon-inc
Copy link
Contributor Author

Update: This test is a bit of a rabbit hole.

The problem is, if one tries to simply return a vector filled with 0's in the RETURNDATACOPY function, memCopySelf.json fails stating that a gass difference error.
HOWEVER, 10 additional tests fail.

@lima-limon-inc
Copy link
Contributor Author

lima-limon-inc commented Dec 13, 2024

This test, as seen in the mnemonics, uses the CALL operand.

While debugging, it seems like the generic_call function is receiving as address:
0x0000000000000000000000000000000000000004
When in reality, that is not an address.

The only other address in the test is: 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b

That leads me to believe that the problem is in one of the other operands.

@lima-limon-inc lima-limon-inc removed their assignment Dec 13, 2024
@lima-limon-inc lima-limon-inc changed the title ExecutionResultMismatch: stMemoryTest/memCopySelf Revert(OutOfBounds): stMemoryTest/memCopySelf Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
levm Lambda EVM implementation
Projects
Status: No status
1 participant