diff --git a/system-contracts/contracts/EvmInterpreterLoop.template.yul b/system-contracts/contracts/EvmInterpreterLoop.template.yul index 9fe08f42d..c6fba46c4 100644 --- a/system-contracts/contracts/EvmInterpreterLoop.template.yul +++ b/system-contracts/contracts/EvmInterpreterLoop.template.yul @@ -411,14 +411,8 @@ for { } true { } { size, sp := popStackItemWithoutCheck(sp) checkOverflow(destOffset, size, evmGasLeft) - checkOverflow(offset, size, evmGasLeft) - checkOverflow(add(offset, size), MEM_OFFSET_INNER(), evmGasLeft) checkMemOverflowByOffset(add(destOffset,size), evmGasLeft) - if gt(add(add(offset, size), MEM_OFFSET_INNER()), MAX_MEMORY_FRAME()) { - $llvm_AlwaysInline_llvm$_memsetToZero(add(destOffset, MEM_OFFSET_INNER()), size) - } - // dynamicGas = 3 * minimum_word_size + memory_expansion_cost // minimum_word_size = (size + 31) / 32 let dynamicGas := add(mul(3, shr(5, add(size, 31))), expandMemory(add(destOffset, size))) diff --git a/system-contracts/contracts/EvmInterpreterPreprocessed.yul b/system-contracts/contracts/EvmInterpreterPreprocessed.yul index c1ce65a83..5f2e8b602 100644 --- a/system-contracts/contracts/EvmInterpreterPreprocessed.yul +++ b/system-contracts/contracts/EvmInterpreterPreprocessed.yul @@ -1942,14 +1942,8 @@ object "EVMInterpreter" { size, sp := popStackItemWithoutCheck(sp) checkOverflow(destOffset, size, evmGasLeft) - checkOverflow(offset, size, evmGasLeft) - checkOverflow(add(offset, size), MEM_OFFSET_INNER(), evmGasLeft) checkMemOverflowByOffset(add(destOffset,size), evmGasLeft) - if gt(add(add(offset, size), MEM_OFFSET_INNER()), MAX_MEMORY_FRAME()) { - $llvm_AlwaysInline_llvm$_memsetToZero(add(destOffset, MEM_OFFSET_INNER()), size) - } - // dynamicGas = 3 * minimum_word_size + memory_expansion_cost // minimum_word_size = (size + 31) / 32 let dynamicGas := add(mul(3, shr(5, add(size, 31))), expandMemory(add(destOffset, size))) @@ -4906,14 +4900,8 @@ object "EVMInterpreter" { size, sp := popStackItemWithoutCheck(sp) checkOverflow(destOffset, size, evmGasLeft) - checkOverflow(offset, size, evmGasLeft) - checkOverflow(add(offset, size), MEM_OFFSET_INNER(), evmGasLeft) checkMemOverflowByOffset(add(destOffset,size), evmGasLeft) - if gt(add(add(offset, size), MEM_OFFSET_INNER()), MAX_MEMORY_FRAME()) { - $llvm_AlwaysInline_llvm$_memsetToZero(add(destOffset, MEM_OFFSET_INNER()), size) - } - // dynamicGas = 3 * minimum_word_size + memory_expansion_cost // minimum_word_size = (size + 31) / 32 let dynamicGas := add(mul(3, shr(5, add(size, 31))), expandMemory(add(destOffset, size)))