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

Known issues with valid solidity #80

Open
area opened this issue Jul 25, 2017 · 3 comments
Open

Known issues with valid solidity #80

area opened this issue Jul 25, 2017 · 3 comments

Comments

@area
Copy link
Contributor

area commented Jul 25, 2017

Generalising this issue to contain all cases of valid solidity that we know we can't instrument...

These are either going to need edge cases coded, or use of debug_traceTransaction to avoid instrumentation all together.

Hopefully, nothing here would be something realistically used in 'real' solidity contracts, and are just odds and ends for us to look at.

@area area changed the title Conditional assignment to VariableDeclaration Known issues with valid solidity Jul 27, 2017
@area
Copy link
Contributor Author

area commented Jul 27, 2017

cgewecke originally posted this, referring to instrumentation of var w = x ? y : z.

I really like the tuple solution for conditional statements.

Theres an uncovered edge case for Variable initializations because solidity wont allow you to reference a var before its type is decided. Basically this:

Error: Instrumented solidity invalid: :26:5: Error: Assignment necessary for type detection.
   var z; (,z) = y ? (y,false) : (y,true);
   ^----^

To fix this you'd have to look down the tree and figure out what the type of the result of the ConditionalExpression is and initialize the var statement with it. It would be incredibly complicated.

@area
Copy link
Contributor Author

area commented Jul 27, 2017

var () = assert(x);

This actually doesn't even parse, due to a bug in solidityparser, but even if it did, our instrumentation would not be correct.

@gitpusha
Copy link

gitpusha commented Apr 7, 2020

Hi all,

I think the issue I just raised might be related #493

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

No branches or pull requests

3 participants