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

operations remove 00 prefix from addresses which leads to crashes. #88

Closed
mhhf opened this issue Oct 13, 2016 · 8 comments · Fixed by #91
Closed

operations remove 00 prefix from addresses which leads to crashes. #88

mhhf opened this issue Oct 13, 2016 · 8 comments · Fixed by #91
Assignees

Comments

@mhhf
Copy link
Contributor

mhhf commented Oct 13, 2016

I discovered this first in ethereumjs-vm 1.4 and could reproduce it in 2.0. Strangely this bug is system specific - it lead to a crash on Ubuntu but succeeded on OS X.

The error happens on a deployment of contract A which deploys another contract B. Code was compiled with solidity 0.4.3

At some Point the stack look like the following:

0 0x00b68db15676a4024a0b2cfe93c41c10c2323c44  <- B's address after deployment
1 0x01
...

Here the operation MUL is performed which produces the stack:

0 0xb68db15676a4024a0b2cfe93c41c10c2323c44
...

Note that the new address misses its 00 prefix which later leads to an error.

@axic
Copy link
Member

axic commented Oct 13, 2016

Can you tell what is the exact crash you see?

It is a bit messy how the stack items are handled, there was an unfinished PR to sort that out (#37).

@mhhf
Copy link
Contributor Author

mhhf commented Oct 14, 2016

The exact crash is: Error: VM Exception while executing transaction: out of gas

However, this is because at some point: EXTCODESIZE is called on 0xb68db15676a4024a0b2cfe93c41c10c2323c44 which ultimately leads to a empty trie lookup and with this to an invalid jump

@axic
Copy link
Member

axic commented Oct 14, 2016

@mhhf thanks! Will check it soon.

@mhhf
Copy link
Contributor Author

mhhf commented Oct 22, 2016

when can we expect a version bump with this?

@axic
Copy link
Member

axic commented Oct 24, 2016

After #84 is merged, hopefully all this week.

@axic
Copy link
Member

axic commented Oct 31, 2016

@mhhf 2.0.1 is released 🎉

@ethernomad
Copy link

Should this fix be backported to 1.4?

@axic
Copy link
Member

axic commented Nov 7, 2016

@ethernomad the 2.x release was made way too early and as such doesn't include many changes, but this also means moving to 2.x is very simple. The only change is to update the parameter passing to the VM constructor.

evertonfraga pushed a commit to evertonfraga/ethereumjs-vm that referenced this issue Dec 16, 2019
holgerd77 added a commit to holgerd77/ethereumjs-vm that referenced this issue Nov 30, 2020
…exports

k-bucket Update to v5.0.0 / esModuleInterop issue on client integration Fix
holgerd77 pushed a commit that referenced this issue Dec 1, 2020
holgerd77 pushed a commit that referenced this issue Mar 11, 2021
es6 round 1 - remove all vars and anon functions
ryanio pushed a commit that referenced this issue Jan 10, 2022
Remove package.json `testling` property
holgerd77 added a commit that referenced this issue May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants