Skip to content

[Bug-Candidate]: Slither crashes when Yul contains a function call with the same name as a local variable. #2655

Open
@lum7na

Description

@lum7na

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-candidateBugs reports that are not yet confirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions