Skip to content

fix(evm): fix ZEN_LOG format string mismatch - #457

Merged
zoowii merged 2 commits into
DTVMStack:mainfrom
cmgCr:cmgCr/fix_issue450
Apr 10, 2026
Merged

fix(evm): fix ZEN_LOG format string mismatch#457
zoowii merged 2 commits into
DTVMStack:mainfrom
cmgCr:cmgCr/fix_issue450

Conversation

@cmgCr

@cmgCr cmgCr commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

ZEN_LOG_* macros use snprintf (printf-style %s/%d), but several log calls in evm_test_host.hpp and evm_test_helpers.h used fmt-style {} placeholders. snprintf ignores {}, leaving them in the output string. When spdlog then parses the message as a fmt format string, it triggers 'argument index out of range' error.

Fixed by replacing all {} with %s in ZEN_LOG_* calls. Also fixed a mixed {%d} format in action/interpreter.cpp.

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

2. What is the scope of this PR (e.g. component or file name):

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains CI/CD configuration changes
  • Contains documentation changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

6. Release note

None

…out of range'

ZEN_LOG_* macros use snprintf (printf-style %s/%d), but several log calls
in evm_test_host.hpp and evm_test_helpers.h used fmt-style {} placeholders.
snprintf ignores {}, leaving them in the output string. When spdlog then
parses the message as a fmt format string, it triggers 'argument index out
of range' error.

Fixed by replacing all {} with %s in ZEN_LOG_* calls.
Also fixed a mixed {%d} format in action/interpreter.cpp.

Fixes DTVMStack#450, DTVMStack#452
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown

⚡ Performance Regression Check Results

✅ Performance Check Passed (interpreter)

Performance Benchmark Results (threshold: 25%)

Benchmark Baseline (us) Current (us) Change Status
total/main/blake2b_huff/8415nulls 1.70 1.56 -7.8% PASS
total/main/blake2b_huff/empty 0.03 0.03 -7.5% PASS
total/main/blake2b_shifts/8415nulls 12.71 11.67 -8.2% PASS
total/main/sha1_divs/5311 5.67 5.13 -9.5% PASS
total/main/sha1_divs/empty 0.06 0.06 -1.8% PASS
total/main/sha1_shifts/5311 3.12 2.81 -9.7% PASS
total/main/sha1_shifts/empty 0.04 0.04 -8.2% PASS
total/main/snailtracer/benchmark 54.46 52.48 -3.6% PASS
total/main/structarray_alloc/nfts_rank 1.07 1.00 -6.8% PASS
total/main/swap_math/insufficient_liquidity 0.00 0.00 -8.2% PASS
total/main/swap_math/received 0.01 0.00 -8.9% PASS
total/main/swap_math/spent 0.00 0.00 -9.1% PASS
total/main/weierstrudel/1 0.29 0.30 +2.0% PASS
total/main/weierstrudel/15 3.32 3.31 -0.5% PASS
total/micro/JUMPDEST_n0/empty 1.84 1.80 -2.5% PASS
total/micro/jump_around/empty 0.06 0.09 +52.5% PASS
total/micro/loop_with_many_jumpdests/empty 28.11 27.44 -2.4% PASS
total/micro/memory_grow_mload/by1 0.09 0.09 +6.6% PASS
total/micro/memory_grow_mload/by16 0.10 0.09 -6.9% PASS
total/micro/memory_grow_mload/by32 0.11 0.11 -6.4% PASS
total/micro/memory_grow_mload/nogrow 0.09 0.09 -2.2% PASS
total/micro/memory_grow_mstore/by1 0.10 0.09 -0.7% PASS
total/micro/memory_grow_mstore/by16 0.12 0.10 -13.0% PASS
total/micro/memory_grow_mstore/by32 0.14 0.11 -17.8% PASS
total/micro/memory_grow_mstore/nogrow 0.09 0.09 -5.2% PASS
total/micro/signextend/one 0.27 0.23 -12.4% PASS
total/micro/signextend/zero 0.26 0.23 -9.8% PASS
total/synth/ADD/b0 2.20 1.98 -9.9% PASS
total/synth/ADD/b1 2.28 1.96 -13.9% PASS
total/synth/ADDRESS/a0 5.44 4.73 -13.2% PASS
total/synth/ADDRESS/a1 5.99 5.22 -12.9% PASS
total/synth/AND/b0 1.86 1.71 -8.1% PASS
total/synth/AND/b1 1.88 1.71 -8.9% PASS
total/synth/BYTE/b0 6.79 6.13 -9.7% PASS
total/synth/BYTE/b1 5.40 4.76 -11.9% PASS
total/synth/CALLDATASIZE/a0 3.27 3.26 -0.4% PASS
total/synth/CALLDATASIZE/a1 3.66 3.51 -4.0% PASS
total/synth/CALLER/a0 5.44 4.75 -12.7% PASS
total/synth/CALLER/a1 5.99 5.22 -12.7% PASS
total/synth/CALLVALUE/a0 3.70 3.28 -11.5% PASS
total/synth/CALLVALUE/a1 3.32 3.51 +5.6% PASS
total/synth/CODESIZE/a0 3.59 3.59 -0.1% PASS
total/synth/CODESIZE/a1 3.85 3.83 -0.4% PASS
total/synth/DUP1/d0 1.29 1.14 -11.9% PASS
total/synth/DUP1/d1 1.48 1.31 -11.5% PASS
total/synth/DUP10/d0 1.29 1.14 -11.7% PASS
total/synth/DUP10/d1 1.39 1.23 -11.5% PASS
total/synth/DUP11/d0 1.38 1.15 -16.9% PASS
total/synth/DUP11/d1 1.12 1.23 +10.0% PASS
total/synth/DUP12/d0 1.29 1.15 -11.1% PASS
total/synth/DUP12/d1 1.39 1.23 -11.5% PASS
total/synth/DUP13/d0 1.11 0.99 -11.3% PASS
total/synth/DUP13/d1 1.13 1.02 -9.3% PASS
total/synth/DUP14/d0 1.39 1.15 -17.3% PASS
total/synth/DUP14/d1 1.13 1.23 +9.4% PASS
total/synth/DUP15/d0 1.38 1.15 -17.2% PASS
total/synth/DUP15/d1 1.12 1.23 +10.0% PASS
total/synth/DUP16/d0 1.29 1.15 -11.4% PASS
total/synth/DUP16/d1 1.12 1.23 +10.3% PASS
total/synth/DUP2/d0 1.38 1.14 -17.4% PASS
total/synth/DUP2/d1 1.12 1.23 +10.2% PASS
total/synth/DUP3/d0 1.38 1.14 -17.3% PASS
total/synth/DUP3/d1 1.39 1.23 -11.7% PASS
total/synth/DUP4/d0 1.38 1.14 -17.3% PASS
total/synth/DUP4/d1 1.12 1.23 +9.9% PASS
total/synth/DUP5/d0 1.38 1.14 -17.5% PASS
total/synth/DUP5/d1 1.12 1.23 +10.1% PASS
total/synth/DUP6/d0 1.29 1.15 -11.3% PASS
total/synth/DUP6/d1 1.12 1.23 +10.2% PASS
total/synth/DUP7/d0 1.11 1.15 +3.2% PASS
total/synth/DUP7/d1 1.12 1.15 +3.0% PASS
total/synth/DUP8/d0 1.29 1.14 -11.4% PASS
total/synth/DUP8/d1 1.39 1.23 -11.3% PASS
total/synth/DUP9/d0 1.30 1.15 -11.4% PASS
total/synth/DUP9/d1 1.12 1.14 +2.3% PASS
total/synth/EQ/b0 3.12 2.76 -11.4% PASS
total/synth/EQ/b1 1.47 1.33 -9.6% PASS
total/synth/GAS/a0 3.87 3.91 +1.1% PASS
total/synth/GAS/a1 3.98 3.92 -1.4% PASS
total/synth/GT/b0 3.02 2.59 -14.2% PASS
total/synth/GT/b1 1.58 1.63 +3.8% PASS
total/synth/ISZERO/u0 0.96 1.15 +20.1% PASS
total/synth/JUMPDEST/n0 1.85 1.80 -2.4% PASS
total/synth/LT/b0 3.00 2.63 -12.5% PASS
total/synth/LT/b1 1.48 1.63 +10.1% PASS
total/synth/MSIZE/a0 4.80 4.25 -11.5% PASS
total/synth/MSIZE/a1 5.35 4.75 -11.3% PASS
total/synth/MUL/b0 6.19 5.32 -14.1% PASS
total/synth/MUL/b1 6.26 5.30 -15.4% PASS
total/synth/NOT/u0 1.83 1.69 -7.9% PASS
total/synth/OR/b0 1.87 1.64 -12.1% PASS
total/synth/OR/b1 1.88 1.71 -8.8% PASS
total/synth/PC/a0 3.26 3.02 -7.5% PASS
total/synth/PC/a1 3.72 3.85 +3.4% PASS
total/synth/PUSH1/p0 1.29 1.15 -11.3% PASS
total/synth/PUSH1/p1 1.38 1.23 -10.5% PASS
total/synth/PUSH10/p0 1.29 0.91 -29.6% PASS
total/synth/PUSH10/p1 1.19 1.29 +8.8% PASS
total/synth/PUSH11/p0 1.04 1.07 +3.3% PASS
total/synth/PUSH11/p1 1.39 1.30 -6.1% PASS
total/synth/PUSH12/p0 1.29 0.91 -29.5% PASS
total/synth/PUSH12/p1 1.39 1.29 -7.0% PASS
total/synth/PUSH13/p0 1.02 1.07 +4.5% PASS
total/synth/PUSH13/p1 1.38 1.30 -5.7% PASS
total/synth/PUSH14/p0 1.02 1.16 +13.8% PASS
total/synth/PUSH14/p1 1.14 1.30 +13.9% PASS
total/synth/PUSH15/p0 1.02 1.15 +12.6% PASS
total/synth/PUSH15/p1 1.40 1.39 -0.7% PASS
total/synth/PUSH16/p0 1.29 1.15 -11.2% PASS
total/synth/PUSH16/p1 1.38 1.29 -6.8% PASS
total/synth/PUSH17/p0 1.20 1.15 -4.4% PASS
total/synth/PUSH17/p1 1.15 1.29 +12.4% PASS
total/synth/PUSH18/p0 1.29 1.13 -12.4% PASS
total/synth/PUSH18/p1 1.38 1.29 -6.5% PASS
total/synth/PUSH19/p0 1.02 1.15 +12.6% PASS
total/synth/PUSH19/p1 1.38 1.30 -6.0% PASS
total/synth/PUSH2/p0 1.29 1.07 -17.5% PASS
total/synth/PUSH2/p1 1.37 1.24 -9.8% PASS
total/synth/PUSH20/p0 1.29 1.15 -11.3% PASS
total/synth/PUSH20/p1 1.38 1.30 -5.6% PASS
total/synth/PUSH21/p0 1.02 1.15 +12.1% PASS
total/synth/PUSH21/p1 1.39 1.31 -5.8% PASS
total/synth/PUSH22/p0 1.02 1.15 +12.7% PASS
total/synth/PUSH22/p1 1.42 1.30 -8.7% PASS
total/synth/PUSH23/p0 1.29 1.15 -11.1% PASS
total/synth/PUSH23/p1 1.38 1.31 -4.9% PASS
total/synth/PUSH24/p0 1.29 1.14 -12.1% PASS
total/synth/PUSH24/p1 1.16 1.31 +12.8% PASS
total/synth/PUSH25/p0 1.29 1.07 -17.3% PASS
total/synth/PUSH25/p1 1.18 1.31 +11.4% PASS
total/synth/PUSH26/p0 1.02 0.91 -10.6% PASS
total/synth/PUSH26/p1 1.40 1.31 -6.4% PASS
total/synth/PUSH27/p0 1.02 1.10 +7.5% PASS
total/synth/PUSH27/p1 1.38 1.30 -6.0% PASS
total/synth/PUSH28/p0 1.29 1.07 -17.3% PASS
total/synth/PUSH28/p1 1.40 1.31 -6.4% PASS
total/synth/PUSH29/p0 1.02 1.15 +12.5% PASS
total/synth/PUSH29/p1 1.20 1.31 +9.3% PASS
total/synth/PUSH3/p0 1.02 0.91 -11.0% PASS
total/synth/PUSH3/p1 1.11 1.28 +15.3% PASS
total/synth/PUSH30/p0 1.29 1.02 -21.1% PASS
total/synth/PUSH30/p1 1.39 1.34 -3.8% PASS
total/synth/PUSH31/p0 1.02 1.07 +4.5% PASS
total/synth/PUSH31/p1 1.17 1.38 +17.5% PASS
total/synth/PUSH32/p0 1.02 1.07 +4.6% PASS
total/synth/PUSH32/p1 1.21 1.35 +11.4% PASS
total/synth/PUSH4/p0 1.29 1.07 -17.2% PASS
total/synth/PUSH4/p1 1.39 1.28 -7.6% PASS
total/synth/PUSH5/p0 1.02 0.91 -11.1% PASS
total/synth/PUSH5/p1 1.37 1.29 -6.5% PASS
total/synth/PUSH6/p0 1.02 0.91 -11.0% PASS
total/synth/PUSH6/p1 1.12 1.29 +15.5% PASS
total/synth/PUSH7/p0 1.02 0.92 -9.8% PASS
total/synth/PUSH7/p1 1.12 1.30 +15.5% PASS
total/synth/PUSH8/p0 1.02 1.15 +12.6% PASS
total/synth/PUSH8/p1 1.37 1.29 -6.3% PASS
total/synth/PUSH9/p0 1.02 1.15 +12.7% PASS
total/synth/PUSH9/p1 1.14 1.29 +12.7% PASS
total/synth/RETURNDATASIZE/a0 3.59 3.60 +0.3% PASS
total/synth/RETURNDATASIZE/a1 4.09 3.83 -6.2% PASS
total/synth/SAR/b0 4.36 3.78 -13.2% PASS
total/synth/SAR/b1 4.81 4.27 -11.2% PASS
total/synth/SGT/b0 3.01 2.60 -13.6% PASS
total/synth/SGT/b1 1.94 1.72 -11.5% PASS
total/synth/SHL/b0 3.50 3.04 -13.1% PASS
total/synth/SHL/b1 1.67 1.71 +2.6% PASS
total/synth/SHR/b0 3.52 2.93 -16.5% PASS
total/synth/SHR/b1 1.62 1.63 +0.2% PASS
total/synth/SIGNEXTEND/b0 3.60 3.38 -5.9% PASS
total/synth/SIGNEXTEND/b1 3.79 3.52 -7.2% PASS
total/synth/SLT/b0 3.08 2.60 -15.4% PASS
total/synth/SLT/b1 1.94 1.72 -11.4% PASS
total/synth/SUB/b0 2.19 1.99 -9.4% PASS
total/synth/SUB/b1 2.28 1.96 -13.9% PASS
total/synth/SWAP1/s0 1.67 1.49 -11.0% PASS
total/synth/SWAP10/s0 1.69 1.53 -9.4% PASS
total/synth/SWAP11/s0 1.69 1.65 -2.4% PASS
total/synth/SWAP12/s0 1.69 1.65 -2.4% PASS
total/synth/SWAP13/s0 1.69 1.65 -2.4% PASS
total/synth/SWAP14/s0 1.69 1.64 -2.7% PASS
total/synth/SWAP15/s0 1.69 1.65 -2.6% PASS
total/synth/SWAP16/s0 1.70 1.65 -2.6% PASS
total/synth/SWAP2/s0 1.68 1.53 -8.5% PASS
total/synth/SWAP3/s0 1.68 1.64 -2.1% PASS
total/synth/SWAP4/s0 1.68 1.64 -2.4% PASS
total/synth/SWAP5/s0 1.68 1.53 -8.8% PASS
total/synth/SWAP6/s0 1.68 1.50 -10.9% PASS
total/synth/SWAP7/s0 1.68 1.64 -2.3% PASS
total/synth/SWAP8/s0 1.68 1.64 -2.3% PASS
total/synth/SWAP9/s0 1.69 1.64 -2.5% PASS
total/synth/XOR/b0 1.74 1.55 -11.4% PASS
total/synth/XOR/b1 1.75 1.55 -11.4% PASS
total/synth/loop_v1 4.55 4.44 -2.3% PASS
total/synth/loop_v2 4.55 4.45 -2.2% PASS

Summary: 194 benchmarks, 0 regressions


✅ Performance Check Passed (multipass)

Performance Benchmark Results (threshold: 25%)

Benchmark Baseline (us) Current (us) Change Status
total/main/blake2b_huff/8415nulls 1.56 1.55 -0.9% PASS
total/main/blake2b_huff/empty 0.07 0.07 +0.4% PASS
total/main/blake2b_shifts/8415nulls 3.35 3.29 -1.9% PASS
total/main/sha1_divs/5311 0.53 0.53 +0.4% PASS
total/main/sha1_divs/empty 0.01 0.01 -0.0% PASS
total/main/sha1_shifts/5311 0.46 0.46 -0.3% PASS
total/main/sha1_shifts/empty 0.01 0.01 +0.4% PASS
total/main/snailtracer/benchmark 52.88 52.49 -0.7% PASS
total/main/structarray_alloc/nfts_rank 0.30 0.30 -0.4% PASS
total/main/swap_math/insufficient_liquidity 0.02 0.02 -1.6% PASS
total/main/swap_math/received 0.02 0.02 -0.6% PASS
total/main/swap_math/spent 0.02 0.02 -0.9% PASS
total/main/weierstrudel/1 0.35 0.35 -0.1% PASS
total/main/weierstrudel/15 3.22 3.21 -0.2% PASS
total/micro/JUMPDEST_n0/empty 0.13 0.13 +0.0% PASS
total/micro/jump_around/empty 0.62 0.62 +0.1% PASS
total/micro/loop_with_many_jumpdests/empty 1.96 1.96 +0.1% PASS
total/micro/memory_grow_mload/by1 0.18 0.17 -1.2% PASS
total/micro/memory_grow_mload/by16 0.19 0.19 +0.3% PASS
total/micro/memory_grow_mload/by32 0.20 0.20 +0.8% PASS
total/micro/memory_grow_mload/nogrow 0.17 0.17 -0.2% PASS
total/micro/memory_grow_mstore/by1 0.18 0.18 -0.1% PASS
total/micro/memory_grow_mstore/by16 0.19 0.19 +0.3% PASS
total/micro/memory_grow_mstore/by32 0.21 0.21 +0.1% PASS
total/micro/memory_grow_mstore/nogrow 0.18 0.18 -0.5% PASS
total/micro/signextend/one 0.34 0.34 +0.1% PASS
total/micro/signextend/zero 0.34 0.34 +0.1% PASS
total/synth/ADD/b0 0.01 0.01 +0.0% PASS
total/synth/ADD/b1 0.01 0.01 +0.0% PASS
total/synth/ADDRESS/a0 0.16 0.16 +0.1% PASS
total/synth/ADDRESS/a1 0.16 0.16 +0.1% PASS
total/synth/AND/b0 0.01 0.01 +0.0% PASS
total/synth/AND/b1 0.01 0.01 -0.0% PASS
total/synth/BYTE/b0 0.01 0.01 -0.1% PASS
total/synth/BYTE/b1 0.01 0.01 +0.1% PASS
total/synth/CALLDATASIZE/a0 0.08 0.08 -0.0% PASS
total/synth/CALLDATASIZE/a1 0.08 0.08 -0.0% PASS
total/synth/CALLER/a0 0.16 0.16 -0.1% PASS
total/synth/CALLER/a1 0.16 0.16 +0.1% PASS
total/synth/CALLVALUE/a0 0.28 0.28 +0.0% PASS
total/synth/CALLVALUE/a1 0.28 0.28 +0.2% PASS
total/synth/CODESIZE/a0 0.08 0.08 +0.1% PASS
total/synth/CODESIZE/a1 0.08 0.08 -0.0% PASS
total/synth/DUP1/d0 0.01 0.01 -0.0% PASS
total/synth/DUP1/d1 0.01 0.01 -0.1% PASS
total/synth/DUP10/d0 0.01 0.01 -0.1% PASS
total/synth/DUP10/d1 0.01 0.01 +0.0% PASS
total/synth/DUP11/d0 0.01 0.01 +0.0% PASS
total/synth/DUP11/d1 0.01 0.01 +6.5% PASS
total/synth/DUP12/d0 0.01 0.01 +0.1% PASS
total/synth/DUP12/d1 0.01 0.01 +0.0% PASS
total/synth/DUP13/d0 0.01 0.01 +0.0% PASS
total/synth/DUP13/d1 0.01 0.01 -0.0% PASS
total/synth/DUP14/d0 0.01 0.01 -0.1% PASS
total/synth/DUP14/d1 0.01 0.01 +0.1% PASS
total/synth/DUP15/d0 0.01 0.01 -0.2% PASS
total/synth/DUP15/d1 0.01 0.01 -0.1% PASS
total/synth/DUP16/d0 0.01 0.01 +0.1% PASS
total/synth/DUP16/d1 0.01 0.01 +0.1% PASS
total/synth/DUP2/d0 0.01 0.01 -0.0% PASS
total/synth/DUP2/d1 0.01 0.01 -0.0% PASS
total/synth/DUP3/d0 0.01 0.01 -0.0% PASS
total/synth/DUP3/d1 0.01 0.01 -0.0% PASS
total/synth/DUP4/d0 0.01 0.01 +0.0% PASS
total/synth/DUP4/d1 0.01 0.01 +0.0% PASS
total/synth/DUP5/d0 0.01 0.01 +0.4% PASS
total/synth/DUP5/d1 0.01 0.01 +0.1% PASS
total/synth/DUP6/d0 0.01 0.01 -0.0% PASS
total/synth/DUP6/d1 0.01 0.01 -0.0% PASS
total/synth/DUP7/d0 0.01 0.01 +0.0% PASS
total/synth/DUP7/d1 0.01 0.01 -0.0% PASS
total/synth/DUP8/d0 0.01 0.01 -0.1% PASS
total/synth/DUP8/d1 0.01 0.01 +0.0% PASS
total/synth/DUP9/d0 0.01 0.01 -0.0% PASS
total/synth/DUP9/d1 0.01 0.01 +0.3% PASS
total/synth/EQ/b0 0.01 0.01 +0.1% PASS
total/synth/EQ/b1 0.01 0.01 -0.0% PASS
total/synth/GAS/a0 0.80 0.80 -0.0% PASS
total/synth/GAS/a1 0.77 0.77 -0.0% PASS
total/synth/GT/b0 0.01 0.01 -0.0% PASS
total/synth/GT/b1 0.01 0.01 +0.3% PASS
total/synth/ISZERO/u0 0.01 0.01 +0.0% PASS
total/synth/JUMPDEST/n0 0.14 0.13 -1.4% PASS
total/synth/LT/b0 0.01 0.01 +0.1% PASS
total/synth/LT/b1 0.01 0.01 -0.0% PASS
total/synth/MSIZE/a0 0.01 0.01 +0.2% PASS
total/synth/MSIZE/a1 0.01 0.01 +0.4% PASS
total/synth/MUL/b0 0.01 0.01 +0.0% PASS
total/synth/MUL/b1 0.01 0.01 +0.1% PASS
total/synth/NOT/u0 0.01 0.01 +0.0% PASS
total/synth/OR/b0 0.01 0.01 +0.4% PASS
total/synth/OR/b1 0.01 0.01 +0.1% PASS
total/synth/PC/a0 0.01 0.01 +0.1% PASS
total/synth/PC/a1 0.01 0.01 +0.1% PASS
total/synth/PUSH1/p0 0.01 0.01 -0.0% PASS
total/synth/PUSH1/p1 0.01 0.01 +0.1% PASS
total/synth/PUSH10/p0 0.01 0.01 -0.0% PASS
total/synth/PUSH10/p1 0.01 0.01 +0.1% PASS
total/synth/PUSH11/p0 0.01 0.01 -0.1% PASS
total/synth/PUSH11/p1 0.01 0.01 +0.2% PASS
total/synth/PUSH12/p0 0.01 0.01 -0.0% PASS
total/synth/PUSH12/p1 0.01 0.01 +0.1% PASS
total/synth/PUSH13/p0 0.01 0.01 +0.0% PASS
total/synth/PUSH13/p1 0.01 0.01 +0.1% PASS
total/synth/PUSH14/p0 0.01 0.01 -0.1% PASS
total/synth/PUSH14/p1 0.01 0.01 +0.0% PASS
total/synth/PUSH15/p0 0.01 0.01 -0.0% PASS
total/synth/PUSH15/p1 0.01 0.01 +0.1% PASS
total/synth/PUSH16/p0 0.01 0.01 -0.0% PASS
total/synth/PUSH16/p1 0.01 0.01 +0.1% PASS
total/synth/PUSH17/p0 0.01 0.01 -0.1% PASS
total/synth/PUSH17/p1 0.01 0.01 +0.1% PASS
total/synth/PUSH18/p0 0.01 0.01 -0.1% PASS
total/synth/PUSH18/p1 0.01 0.01 +0.2% PASS
total/synth/PUSH19/p0 0.01 0.01 +0.3% PASS
total/synth/PUSH19/p1 0.01 0.01 -0.0% PASS
total/synth/PUSH2/p0 0.01 0.01 +0.0% PASS
total/synth/PUSH2/p1 0.01 0.01 +0.1% PASS
total/synth/PUSH20/p0 0.01 0.01 -0.1% PASS
total/synth/PUSH20/p1 0.01 0.01 +0.6% PASS
total/synth/PUSH21/p0 0.01 0.01 -0.0% PASS
total/synth/PUSH21/p1 0.01 0.01 +0.2% PASS
total/synth/PUSH22/p0 1.08 1.08 -0.1% PASS
total/synth/PUSH22/p1 1.31 1.31 +0.3% PASS
total/synth/PUSH23/p0 1.08 1.08 +0.1% PASS
total/synth/PUSH23/p1 1.31 1.34 +2.0% PASS
total/synth/PUSH24/p0 1.08 1.08 -0.4% PASS
total/synth/PUSH24/p1 1.31 1.31 -0.6% PASS
total/synth/PUSH25/p0 1.15 1.08 -6.0% PASS
total/synth/PUSH25/p1 1.31 1.33 +1.3% PASS
total/synth/PUSH26/p0 0.92 0.92 +0.2% PASS
total/synth/PUSH26/p1 1.33 1.31 -1.5% PASS
total/synth/PUSH27/p0 1.15 1.08 -6.6% PASS
total/synth/PUSH27/p1 1.31 1.33 +1.5% PASS
total/synth/PUSH28/p0 1.08 1.08 -0.2% PASS
total/synth/PUSH28/p1 1.31 1.32 +0.9% PASS
total/synth/PUSH29/p0 1.08 1.08 +0.0% PASS
total/synth/PUSH29/p1 1.33 1.35 +1.1% PASS
total/synth/PUSH3/p0 0.01 0.01 -0.0% PASS
total/synth/PUSH3/p1 0.01 0.01 +0.2% PASS
total/synth/PUSH30/p0 1.10 1.13 +2.9% PASS
total/synth/PUSH30/p1 1.32 1.33 +0.9% PASS
total/synth/PUSH31/p0 1.08 1.08 +0.1% PASS
total/synth/PUSH31/p1 1.42 1.47 +3.7% PASS
total/synth/PUSH32/p0 1.16 1.08 -7.0% PASS
total/synth/PUSH32/p1 1.33 1.34 +0.6% PASS
total/synth/PUSH4/p0 0.01 0.01 -0.0% PASS
total/synth/PUSH4/p1 0.01 0.01 +0.0% PASS
total/synth/PUSH5/p0 0.01 0.01 +0.2% PASS
total/synth/PUSH5/p1 0.01 0.01 +0.1% PASS
total/synth/PUSH6/p0 0.01 0.01 -0.1% PASS
total/synth/PUSH6/p1 0.01 0.01 +0.1% PASS
total/synth/PUSH7/p0 0.01 0.01 +0.1% PASS
total/synth/PUSH7/p1 0.01 0.01 +0.0% PASS
total/synth/PUSH8/p0 0.01 0.01 -0.0% PASS
total/synth/PUSH8/p1 0.01 0.01 +0.1% PASS
total/synth/PUSH9/p0 0.01 0.01 -0.1% PASS
total/synth/PUSH9/p1 0.01 0.01 +0.1% PASS
total/synth/RETURNDATASIZE/a0 0.04 0.04 +0.0% PASS
total/synth/RETURNDATASIZE/a1 0.04 0.04 +0.0% PASS
total/synth/SAR/b0 3.78 3.78 -0.0% PASS
total/synth/SAR/b1 4.28 4.29 +0.3% PASS
total/synth/SGT/b0 0.01 0.01 +0.0% PASS
total/synth/SGT/b1 0.01 0.01 -0.0% PASS
total/synth/SHL/b0 3.06 3.04 -0.5% PASS
total/synth/SHL/b1 1.72 1.72 -0.4% PASS
total/synth/SHR/b0 2.94 2.94 -0.0% PASS
total/synth/SHR/b1 1.64 1.64 -0.1% PASS
total/synth/SIGNEXTEND/b0 3.15 3.15 -0.1% PASS
total/synth/SIGNEXTEND/b1 3.53 3.30 -6.7% PASS
total/synth/SLT/b0 0.01 0.01 +0.0% PASS
total/synth/SLT/b1 0.01 0.01 +0.1% PASS
total/synth/SUB/b0 0.01 0.01 +0.0% PASS
total/synth/SUB/b1 0.01 0.01 -0.2% PASS
total/synth/SWAP1/s0 0.01 0.01 -0.0% PASS
total/synth/SWAP10/s0 0.01 0.01 -0.1% PASS
total/synth/SWAP11/s0 0.01 0.01 +0.0% PASS
total/synth/SWAP12/s0 0.01 0.01 -0.1% PASS
total/synth/SWAP13/s0 0.01 0.01 +0.1% PASS
total/synth/SWAP14/s0 0.01 0.01 -0.1% PASS
total/synth/SWAP15/s0 0.01 0.01 +0.1% PASS
total/synth/SWAP16/s0 0.01 0.01 +0.0% PASS
total/synth/SWAP2/s0 0.01 0.01 -0.0% PASS
total/synth/SWAP3/s0 0.01 0.01 -0.1% PASS
total/synth/SWAP4/s0 0.01 0.01 +0.1% PASS
total/synth/SWAP5/s0 0.01 0.01 +0.1% PASS
total/synth/SWAP6/s0 0.01 0.01 +0.0% PASS
total/synth/SWAP7/s0 0.01 0.01 -0.0% PASS
total/synth/SWAP8/s0 0.01 0.01 +0.0% PASS
total/synth/SWAP9/s0 0.01 0.01 +0.0% PASS
total/synth/XOR/b0 0.01 0.01 +0.0% PASS
total/synth/XOR/b1 0.01 0.01 +0.0% PASS
total/synth/loop_v1 1.43 1.43 +0.0% PASS
total/synth/loop_v2 1.35 1.35 +0.2% PASS

Summary: 194 benchmarks, 0 regressions


Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes EVM/test logging format strings to align with ZEN_LOG_*’s snprintf-based (printf-style) formatting, preventing spdlog {argument index out of range} errors caused by leftover {} placeholders.

Changes:

  • Replaced fmt-style {} placeholders with printf-style format specifiers in several ZEN_LOG_* calls in EVM test utilities.
  • Fixed a mixed/incorrect format string in the action interpreter’s “unimplemented opcode” log.
  • Standardized some messages to use %s for string inputs (e.g., ModName.c_str(), E.what()).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/tests/evm_test_host.hpp Updates multiple ZEN_LOG_* callsites to printf-style formatting; however, at least one {} remains and one new %s/argument type mismatch is introduced.
src/tests/evm_test_helpers.h Updates several ZEN_LOG_ERROR strings, but additional {} placeholders remain in other ZEN_LOG_ERROR calls in the same function.
src/action/interpreter.cpp Fixes the “unimplemented opcode” log format to a printf-style hex format.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tests/evm_test_host.hpp
Comment thread src/tests/evm_test_host.hpp Outdated
Comment on lines 764 to 765
ZEN_LOG_ERROR("Insufficient balance for CREATE: have %s, need %s",
SenderBalance, Value);

Copilot AI Apr 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format string/argument mismatch: the message uses %s placeholders but passes intx::uint256 values (SenderBalance, Value). With snprintf-style formatting this is undefined behavior and may not compile (or may crash at runtime). Convert these uint256 values to strings (decimal or hex) and pass .c_str(), or change the format specifiers to match the actual argument types.

Suggested change
ZEN_LOG_ERROR("Insufficient balance for CREATE: have %s, need %s",
SenderBalance, Value);
const auto SenderBalanceStr = intx::to_string(SenderBalance);
const auto ValueStr = intx::to_string(Value);
ZEN_LOG_ERROR("Insufficient balance for CREATE: have %s, need %s",
SenderBalanceStr.c_str(), ValueStr.c_str());

Copilot uses AI. Check for mistakes.
Comment thread src/tests/evm_test_helpers.h
Comment thread src/tests/evm_test_helpers.h
@zoowii
zoowii merged commit a14a9de into DTVMStack:main Apr 10, 2026
17 checks passed
@cmgCr
cmgCr deleted the cmgCr/fix_issue450 branch April 10, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A possible bug in EVM (both interpreter mode and multi-pass JIT mode) A bug in EVM (both interpreter mode and multi-pass JIT mode)

3 participants