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

[Bug]: incorrect cfg when more than one arguments of a function call are ternary expressions #1851

Open
Troublor opened this issue Apr 20, 2023 · 3 comments
Labels
bug Something isn't working cfg

Comments

@Troublor
Copy link
Contributor

Describe the issue:

When more than one arguments of a function call are ternary expressions, only one of the ternary expression are included in CFG.

Code example to reproduce the issue:

contract A {
    function f(uint x) public {
        g(x > 0 ? 1 : 2, x > 1 ? 3 : 4);
    }
    function g(uint x, uint y) private {
    }
}

Version:

0.9.3

Relevant log output:

See the CFG below.
@Troublor Troublor added the bug-candidate Bugs reports that are not yet confirmed label Apr 20, 2023
@Troublor
Copy link
Contributor Author

tmp sol-A-f(uint256) dot

@0xalpharush
Copy link
Contributor

Was this addressed in #1850 or a separate issue?

@0xalpharush 0xalpharush added bug Something isn't working cfg and removed bug-candidate Bugs reports that are not yet confirmed labels Apr 22, 2023
@0xalpharush 0xalpharush changed the title [Bug-Candidate]: incorrect cfg when more than two arguments of a function call are ternary expressions [Bug]: incorrect cfg when more than two arguments of a function call are ternary expressions Apr 22, 2023
@Troublor
Copy link
Contributor Author

Was this addressed in #1850 or a separate issue?

This is a separate issue unrelated to #1850.

@Troublor Troublor changed the title [Bug]: incorrect cfg when more than two arguments of a function call are ternary expressions [Bug]: incorrect cfg when more than one arguments of a function call are ternary expressions Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cfg
Projects
None yet
Development

No branches or pull requests

2 participants