Skip to content

Crash in gasSStoreEIP2200 due to panic in SubRefund #20119

@wuestholz

Description

@wuestholz

I observed a crash in gasSStoreEIP2200 due to a panic in SubRefund. Unfortunately, I don't have a convenient repro for this since it happend during a run of our Harvey fuzzer on the following contract: https://github.com/SmartContractSecurity/SWC-registry/blob/8a3878fec7785d1d06e0857784170340fdfb438b/test_cases/solidity/assert_violations/gas_model/gas_model.sol.

However, looking at the code of gasSStoreEIP2200 and SubRefund I wonder why this error isn't returned by SubRefund and handled in gasSStoreEIP2200 (maybe by terminating the execution with an error).

System information

OS & Version: Windows
Commit hash : a308f01

Expected behaviour

The execution of a transaction shouldn't crash.

Actual behaviour

The execution of a transaction crashes

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