Skip to content

bug(forge): Function signature collisions can cause panics #612

@brockelmore

Description

@brockelmore

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.1.0 (8a61027 2022-01-27T00:21:53.956016803+00:00)

What command(s) is the bug in?

forge test

Operating System

Linux

Describe the bug

We built a massive list of function signatures to use to decode data in stack traces. This worked fine before because we only decoded based on known contracts. Now we do it based on all functions. This causes an issue when two function have the same signature but have different outputs, i.e.: transfer() -> (uint256) and transfer() -> (uint256, uint256). One of these will fail and the trace will panic

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions