Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jumpdest offset overflow #217

Merged
merged 2 commits into from
Nov 28, 2019
Merged

Fix jumpdest offset overflow #217

merged 2 commits into from
Nov 28, 2019

Conversation

chfast
Copy link
Member

@chfast chfast commented Nov 27, 2019

This mostly affects the performance of the analysis, but I think this change must land. Is much better if we are not restricted by the code size in general (i.e. evmone works for any code size).

This do not fix all the issues. There are other case not related to the jumpdest where overflow can happen. That is to be fixed in other PRs.

Comparing bin/evmone-bench-master to bin/evmone-bench
Benchmark                                          Time             CPU      Time Old      Time New       CPU Old       CPU New
-------------------------------------------------------------------------------------------------------------------------------
blake2b_huff/analysis                           +0.0051         +0.0051            26            26            26            26
blake2b_huff/empty                              +0.0063         +0.0062            39            40            39            40
blake2b_huff/2805nulls                          +0.0120         +0.0120           286           290           286           290
blake2b_huff/5610nulls                          +0.0127         +0.0127           533           540           533           540
blake2b_huff/8415nulls                          +0.0210         +0.0210           768           784           768           784
blake2b_huff/65536nulls                         +0.0212         +0.0212          5764          5886          5764          5886
blake2b_shifts/analysis                         +0.0439         +0.0439            12            12            12            12
blake2b_shifts/2805nulls                        +0.0110         +0.0110          2994          3027          2994          3027
blake2b_shifts/5610nulls                        +0.0102         +0.0102          5984          6045          5984          6045
blake2b_shifts/8415nulls                        +0.0089         +0.0089          8962          9041          8962          9041
blake2b_shifts/65536nulls                       +0.0092         +0.0093         69950         70597         69949         70598
sha1_divs/analysis                              +0.0582         +0.0582             3             3             3             3
sha1_divs/empty                                 +0.0139         +0.0139            55            55            55            55
sha1_divs/1351                                  +0.0079         +0.0079          1047          1055          1047          1055
sha1_divs/2737                                  +0.0074         +0.0075          2037          2052          2037          2052
sha1_divs/5311                                  -0.0223         -0.0223          4086          3994          4086          3994
sha1_divs/65536                                 +0.0053         +0.0053         48306         48560         48307         48561
sha1_shifts/analysis                            +0.0508         +0.0508             3             3             3             3
sha1_shifts/empty                               +0.0003         +0.0003            31            31            31            31
sha1_shifts/1351                                -0.0096         -0.0097           583           578           583           578
sha1_shifts/2737                                -0.0102         -0.0102          1132          1120          1132          1120
sha1_shifts/5311                                -0.0080         -0.0080          2206          2188          2206          2188
sha1_shifts/65536                               -0.0107         -0.0107         26842         26554         26842         26555
weierstrudel/analysis                           +0.0811         +0.0811            30            32            30            32
weierstrudel/0                                  +0.0149         +0.0149           248           251           248           251
weierstrudel/1                                  +0.0082         +0.0082           474           478           474           478
weierstrudel/3                                  +0.0078         +0.0078           721           727           721           727
weierstrudel/9                                  +0.0050         +0.0050          1451          1458          1451          1458
weierstrudel/14                                 +0.0044         +0.0044          2060          2069          2060          2069
micro/loop_with_many_jumpdests/analysis         +0.0706         +0.0706           115           124           115           124
micro/loop_with_many_jumpdests                  +0.0051         +0.0051         13044         13110         13044         13111

@chfast chfast force-pushed the fix_jumpdest_overflow branch from 1b295c8 to 53a5808 Compare November 27, 2019 15:49
@codecov-io
Copy link

Codecov Report

Merging #217 into master will decrease coverage by 0.11%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #217      +/-   ##
==========================================
- Coverage     100%   99.88%   -0.12%     
==========================================
  Files           5        5              
  Lines         851      851              
  Branches      113      113              
==========================================
- Hits          851      850       -1     
- Misses          0        1       +1

@bshastry
Copy link

Can confirm that this fixes ethereum/solidity#7776

Once merged, this draft PR (#215) rebased on the merge should also pass all CI tests

@chfast chfast merged commit 264e395 into master Nov 28, 2019
@chfast chfast deleted the fix_jumpdest_overflow branch November 28, 2019 13:02
@chfast
Copy link
Member Author

chfast commented Nov 28, 2019

Once merged, this draft PR (#215) rebased on the merge should also pass all CI tests

Thanks for checking.

jwasinger pushed a commit to jwasinger/evmone that referenced this pull request Apr 27, 2021
cpp: Add evmc::host - wrapper around Host context / interface
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.

4 participants