Skip to content

[Codegen] Recursive fallback function call runs out of gas via legacy but does not via IR #13216

Open
@bshastry

Description

@bshastry
contract C0 {
  fallback() external virtual
  {
    assembly
    {
      calldatacopy(0, not(0), 96)
    }
    (bool l0, bytes memory l1) = address(this).call(bytes("ffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000"));
  }
}
// ====
// compileViaYul: also
// ----
// () -> FAILURE
// gas irOptimized: 211360

Legacy: FAILURE
IR: Pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛codegen errorCompiler generates invalid code. Critical.high impactChanges are very prominent and affect users or the project in a major way.needs investigationviair

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions