From 95699e1b44e99a32c7100db5f66a987b105f73c9 Mon Sep 17 00:00:00 2001 From: Outcry <843648230@qq.com> Date: Tue, 20 Jan 2026 13:04:55 +0000 Subject: [PATCH] fix(evm): remove incorrect depth check in call handling --- src/compiler/evm_frontend/evm_imported.cpp | 5 ----- tests/evmone_unittests/EVMOneMultipassUnitTestsRunList.txt | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/compiler/evm_frontend/evm_imported.cpp b/src/compiler/evm_frontend/evm_imported.cpp index 9009ae006..d85ce2d40 100644 --- a/src/compiler/evm_frontend/evm_imported.cpp +++ b/src/compiler/evm_frontend/evm_imported.cpp @@ -878,11 +878,6 @@ static uint64_t evmHandleCallInternal(zen::runtime::EVMInstance *Instance, return 0; } - if (CurrentMsg->depth >= zen::evm::MAXSTACK) { - Instance->setReturnData({}); - return 0; - } - bool HasEnoughBalance = true; if (TransfersValue) { const auto CallerBalance = Module->Host->get_balance(CurrentMsg->recipient); diff --git a/tests/evmone_unittests/EVMOneMultipassUnitTestsRunList.txt b/tests/evmone_unittests/EVMOneMultipassUnitTestsRunList.txt index d53866467..906031d24 100644 --- a/tests/evmone_unittests/EVMOneMultipassUnitTestsRunList.txt +++ b/tests/evmone_unittests/EVMOneMultipassUnitTestsRunList.txt @@ -180,3 +180,5 @@ multi_vm/evm.swapn_undefined/external_vm multi_vm/evm.undefined/external_vm multi_vm/evm.undefined_instruction_analysis_overflow/external_vm multi_vm/evm.undefined_instruction_block_cost_negative/external_vm +multi_vm/evm.call_oog_after_depth_check/external_vm +multi_vm/evm.delegatecall_oog_depth_limit/external_vm