diff --git a/libsolidity/codegen/ir/IRGenerator.cpp b/libsolidity/codegen/ir/IRGenerator.cpp index c2bb0c3cf..dbd6f445e 100644 --- a/libsolidity/codegen/ir/IRGenerator.cpp +++ b/libsolidity/codegen/ir/IRGenerator.cpp @@ -1069,6 +1069,7 @@ string IRGenerator::dispatchRoutine(ContractDefinition const& _contract) string IRGenerator::memoryInit(bool _useMemoryGuard) { + _useMemoryGuard = true; // This function should be called at the beginning of the EVM call frame // and thus can assume all memory to be zero, including the contents of // the "zero memory area" (the position CompilerUtils::zeroPointer points to). diff --git a/test/externalTests/ens.sh b/test/externalTests/ens.sh index d3fcb0b13..2e7eec183 100755 --- a/test/externalTests/ens.sh +++ b/test/externalTests/ens.sh @@ -46,7 +46,7 @@ function ens_test "${compile_only_presets[@]}" #ir-no-optimize # Compilation fails with "YulException: Variable var__945 is 1 slot(s) too deep inside the stack." #ir-optimize-evm-only # Compilation fails with "YulException: Variable var__945 is 1 slot(s) too deep inside the stack." - #ir-optimize-evm+yul # Compilation fails with "YulException: Variable _5 is 1 too deep in the stack [ _5 usr$i usr$h _7 usr$scratch usr$k usr$f _4 usr$len usr$j_2 RET _2 _1 var_data_mpos usr$totallen usr$x _12 ]" + ir-optimize-evm+yul # Compilation fails with "YulException: Variable _5 is 1 too deep in the stack [ _5 usr$i usr$h _7 usr$scratch usr$k usr$f _4 usr$len usr$j_2 RET _2 _1 var_data_mpos usr$totallen usr$x _12 ]" legacy-optimize-evm-only legacy-optimize-evm+yul ) diff --git a/test/externalTests/euler.sh b/test/externalTests/euler.sh index 485d7ae56..a7ecffa57 100755 --- a/test/externalTests/euler.sh +++ b/test/externalTests/euler.sh @@ -44,7 +44,7 @@ function euler_test "${compile_only_presets[@]}" #ir-no-optimize # Compilation fails with "YulException: Variable var_utilisation_307 is 6 slot(s) too deep inside the stack." #ir-optimize-evm-only # Compilation fails with "YulException: Variable var_utilisation_307 is 6 slot(s) too deep inside the stack." - #ir-optimize-evm+yul # Compilation fails with "YulException: Variable var_status_mpos is 3 too deep in the stack" + ir-optimize-evm+yul # Compilation fails with "YulException: Variable var_status_mpos is 3 too deep in the stack" legacy-optimize-evm-only legacy-optimize-evm+yul legacy-no-optimize diff --git a/test/externalTests/perpetual-pools.sh b/test/externalTests/perpetual-pools.sh index 6c4af4937..a7cb27463 100755 --- a/test/externalTests/perpetual-pools.sh +++ b/test/externalTests/perpetual-pools.sh @@ -45,7 +45,7 @@ function perpetual_pools_test "${compile_only_presets[@]}" #ir-no-optimize # Compilation fails with "YulException: Variable var_amount_527 is 9 slot(s) too deep inside the stack." #ir-optimize-evm-only # Compilation fails with "YulException: Variable var_amount_527 is 9 slot(s) too deep inside the stack." - #ir-optimize-evm+yul # Compilation fails with "YulException: Variable expr_mpos is 1 too deep in the stack" + ir-optimize-evm+yul # Compilation fails with "YulException: Variable expr_mpos is 1 too deep in the stack" legacy-no-optimize legacy-optimize-evm-only legacy-optimize-evm+yul diff --git a/test/externalTests/trident.sh b/test/externalTests/trident.sh index 26c3d3810..28c17f24e 100755 --- a/test/externalTests/trident.sh +++ b/test/externalTests/trident.sh @@ -53,7 +53,7 @@ function trident_test "${compile_only_presets[@]}" #ir-no-optimize # Compilation fails with: "YulException: Variable var_amount_165 is 9 slot(s) too deep inside the stack." #ir-optimize-evm-only # Compilation fails with: "YulException: Variable var_amount_165 is 9 slot(s) too deep inside the stack." - #ir-optimize-evm+yul # Compilation fails with: "YulException: Cannot swap Variable var_nearestTick with Variable _4: too deep in the stack by 4 slots" + ir-optimize-evm+yul # Compilation fails with: "YulException: Cannot swap Variable var_nearestTick with Variable _4: too deep in the stack by 4 slots" legacy-no-optimize legacy-optimize-evm-only legacy-optimize-evm+yul