Open
Description
While the metering "spec" calls for prepending grow_memory
with a gas check, the grow_memory
opcode can still return a failure when enough gas is present, but not enough memory is available.
@d1m0 has suggested this is an issue.
I propose that instead of only injecting a gas check, grow_memory
should be wrapped in a special check which causes a panic (or OOG) on the client.
I'm not sure what is the best behaviour (panic, OOG or something else?), but likely leaving it alone is wrong, because that gives an opportunity to the contract developer to check for the return value of grow_memory
and create diverging behaviours.