bluealloy / revm

Rust implementation of the Ethereum Virtual Machine.
https://bluealloy.github.io/revm/
MIT License
1.64k stars 551 forks source link

feat(EOF): Add non-returning CALLF/JUMPF checks #1663

Closed rakita closed 3 months ago

rakita commented 3 months ago

Error if RETF is found in non-returning code section

Error if JUMPF is calling a section that is different container kind (CodeType) that present section.

github-actions[bot] commented 3 months ago

Valgrind Results:

==3947== Cachegrind, a cache and branch-prediction profiler
==3947== Copyright (C) 2002-2017, and GNU GPL'd, by Nicholas Nethercote et al.
==3947== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==3947== Command: target/release/snailtracer
==3947== 
--3947-- warning: L3 cache found, using its data for the LL simulation.
Running snailtracer example!
elapsed: 1.814919515s
==3947== 
==3947== I   refs:      427,735,888
==3947== I1  misses:          3,117
==3947== LLi misses:          2,840
==3947== I1  miss rate:        0.00%
==3947== LLi miss rate:        0.00%
==3947== 
==3947== D   refs:      204,082,467  (132,273,208 rd   + 71,809,259 wr)
==3947== D1  misses:        340,077  (    200,138 rd   +    139,939 wr)
==3947== LLd misses:        137,640  (      4,347 rd   +    133,293 wr)
==3947== D1  miss rate:         0.2% (        0.2%     +        0.2%  )
==3947== LLd miss rate:         0.1% (        0.0%     +        0.2%  )
==3947== 
==3947== LL refs:           343,194  (    203,255 rd   +    139,939 wr)
==3947== LL misses:         140,480  (      7,187 rd   +    133,293 wr)
==3947== LL miss rate:          0.0% (        0.0%     +        0.2%  )