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

Uninitialized mapping storage pointers should be considered by the static anlysis component #4641

Closed
chriseth opened this issue Aug 1, 2018 · 4 comments
Assignees
Labels

Comments

@chriseth
Copy link
Contributor

chriseth commented Aug 1, 2018

No description provided.

@ekpyron
Copy link
Member

ekpyron commented Aug 1, 2018

Related: #4427

@ekpyron ekpyron self-assigned this Aug 2, 2018
@ekpyron
Copy link
Member

ekpyron commented Aug 3, 2018

The following is already an error (Type is required to live outside storage.):

function f() public pure returns(mapping(uint=>uint) storage) {}

i.e. mappings cannot be returned.

function f() public pure { mapping(uint=>uint) storage m; }

is also already an error Uninitialized mapping. Mappings cannot be created dynamically, you have to assign them from a state variable..

So it seems like nothing has to be done here.

@chriseth
Copy link
Contributor Author

chriseth commented Aug 3, 2018

Argh, but this is bad, I would consider this to be a bug to be fixed for 0.5.0. New issue: #4670

@ekpyron
Copy link
Member

ekpyron commented Aug 3, 2018

Yes, I was wondering, whether this was actually ever intended :).

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

No branches or pull requests

2 participants