Skip to content

Memory corruption issues resulting in OOG from solc-v0.4.22-nightly.2018.4.5+commit.c6adad93.js onwards #4264

@D-Nice

Description

@D-Nice

Starting with this solc, usage of Oraclize's Random and Computation datasources (both dependent on array types and assembly), now fail in creating a query. The error appears to be at creation of the query (line) it pushes the datasource string onto the stack, does unexpected operations, like multiplying the bytes, and then eventually storing those bytes into the free memory pointer, causing an exception at the next MSTORE op.

Two changes that appear to affect this are the commit at be797cb and after the gas buffer was dropped with byzantium vm. Re-introducing pre-byzantium calls (where a little gas would be left over within calling contract, aka bringing back SUB opcode for calls via asm: call(sub(gas, 700), addy, 0, 0, 8, 0, 0x20) avoids the aforementioned corruption.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions