From 8717ca6aa3404431c39070954ffa9d9befbe359b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 1 Jun 2021 22:53:32 +0200 Subject: [PATCH 1/2] appveyor: Add Debug build --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 1e940c0e0d..1616ecd843 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,6 +10,7 @@ branches: - /v\d+\..+/ configuration: - Release + - Debug environment: GITHUB_TOKEN: secure: OE3TGKRyt/hvk5Gt3DLXvs3Y+F1NLDQAL/bHplDffR+hY2aFg6HrapThKjYo/XX2 @@ -26,7 +27,7 @@ install: before_build: - call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd" -arch=amd64 - - cmake -S . -B build -DEVMONE_TESTING=ON -Wno-dev -G "%GENERATOR%" -DCMAKE_INSTALL_PREFIX=C:\install + - cmake -S . -B build -DEVMONE_TESTING=ON -Wno-dev -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DHUNTER_CONFIGURATION_TYPES=%CONFIGURATION% -DCMAKE_INSTALL_PREFIX=C:\install build_script: - cmake --build build --target package From dcee38a2a851bd01532b3a1d13015ebf4222f5bf Mon Sep 17 00:00:00 2001 From: yperbasis Date: Tue, 1 Jun 2021 15:37:47 +0200 Subject: [PATCH 2/2] advanced: Prevent invalid memory subscript index --- lib/evmone/execution.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/evmone/execution.cpp b/lib/evmone/execution.cpp index 266adbcb4a..888dbba1a8 100644 --- a/lib/evmone/execution.cpp +++ b/lib/evmone/execution.cpp @@ -20,7 +20,7 @@ evmc_result execute(AdvancedExecutionState& state, const AdvancedCodeAnalysis& a (state.status == EVMC_SUCCESS || state.status == EVMC_REVERT) ? state.gas_left : 0; return evmc::make_result( - state.status, gas_left, &state.memory[state.output_offset], state.output_size); + state.status, gas_left, state.memory.data() + state.output_offset, state.output_size); } evmc_result execute(evmc_vm* /*unused*/, const evmc_host_interface* host, evmc_host_context* ctx,