From 01eca779c58c19c8659fd5a6bf0cad85613c629b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 16 Sep 2024 10:18:58 +0200 Subject: [PATCH] eof: Don't re-parse EOF header in `RETURNCONTRACT` (#1002) --- lib/evmone/instructions.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/evmone/instructions.hpp b/lib/evmone/instructions.hpp index e3d2062077..6a3c66e321 100644 --- a/lib/evmone/instructions.hpp +++ b/lib/evmone/instructions.hpp @@ -1174,9 +1174,8 @@ inline TermResult returncontract( return {EVMC_OUT_OF_GAS, gas_left}; const auto deploy_container_index = size_t{pos[1]}; - - const auto header = read_valid_eof1_header(state.original_code); - bytes deploy_container{header.get_container(state.original_code, deploy_container_index)}; + bytes deploy_container{state.analysis.baseline->eof_header().get_container( + state.original_code, deploy_container_index)}; // Append (offset, size) to data section if (!append_data_section(deploy_container,