Skip to content

create reference variable for offset and length in Yul #1469

Open
@eMarchenko

Description

@eMarchenko

Describe the issue:

write-after-write detector falsely reacts on assembly work with calldata:

Code example to reproduce the issue:

function foo(bytes calldata cd) private pure returns (bytes calldata signature)
{
    assembly {
        let ptr := add(cd.offset, calldataload(cd.offset))
        signature.offset := add(ptr, 0x20)
        signature.length := calldataload(ptr)
    }
}

Version:

^0.9 - tool was run on other machine

Relevant log output:

No response

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