Skip to content

Commit

Permalink
eof: Don't re-parse EOF header in RETURNCONTRACT (#1002)
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast authored Sep 16, 2024
1 parent fd1d149 commit 01eca77
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/evmone/instructions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 01eca77

Please sign in to comment.