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

OOG when contract calls another contract's function that returns type[4] (or more) #1103

Closed
redsquirrel opened this issue Sep 15, 2016 · 3 comments

Comments

@redsquirrel
Copy link
Contributor

When calling fooInstance.a(<address of B>), this code breaks with an "out of gas" error. Tested on both browser-solidity and on testrpc.

pragma solidity ^0.4;

contract Foo  {
    function a(Bar bar) {
        bar.b();
    }
}

contract Bar {
    function b() returns (uint[4] i) {}
}

If you change the uint[4] to uint[3], the code runs as you would expect. It also appears to happen with any type of array, not just uints.

This seems to be a regression that occurred in 0.4.0, because this problem does not occur on 0.3.5 or 0.3.6.

@axic
Copy link
Member

axic commented Sep 15, 2016

I think this is the same issue as #1083 or at least related.

@redsquirrel
Copy link
Contributor Author

Yes, they seem related.

@chriseth
Copy link
Contributor

Confirmed as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants