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-Candidate]: Slither crashes when Yul contains a function call with the same name as a local variable. #2655

Open
lum7na opened this issue Feb 1, 2025 · 0 comments
Labels
bug-candidate Bugs reports that are not yet confirmed

Comments

@lum7na
Copy link

lum7na commented Feb 1, 2025

Hi! Slither crashes when an inline Yul assembly contains a function call with the same name as a local variable.

Running: slither a.sol

contract Test {
  function test(int256 a) internal {
    assembly  {
      function a() {}
      function b() { a() }
    }
  }
}

Output:

Traceback (most recent call last):
...
slither.exceptions.SlitherException: unexpected function call target type <class 'slither.core.variables.local_variable.LocalVariable'>
ERROR:root:Error:
ERROR:root:unexpected function call target type <class 'slither.core.variables.local_variable.LocalVariable'>
ERROR:root:Please report an issue to https://github.com/crytic/slither/issues

It appears that Slither interprets a() as a function call to the local variable a, rather than the function a defined in the Yul code.

Slither version: 0.11.0

@lum7na lum7na added the bug-candidate Bugs reports that are not yet confirmed label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-candidate Bugs reports that are not yet confirmed
Projects
None yet
Development

No branches or pull requests

1 participant