-
Notifications
You must be signed in to change notification settings - Fork 293
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
Disallow code sections unreachable from section 0 #866
Conversation
hugo-dc
commented
Apr 16, 2024
- Validates the code by using a worklist of accessed code sections
- At the end if any code section was not accessed will return unreachable_code_sections error.
- Fixes tests previously containing unreachable code sections
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #866 +/- ##
=======================================
Coverage 98.37% 98.38%
=======================================
Files 129 129
Lines 15536 15559 +23
=======================================
+ Hits 15284 15307 +23
Misses 252 252
Flags with carried forward coverage won't be shown. Click here to find out more.
|
20da468
to
04a0259
Compare
04a0259
to
8b5e65a
Compare
lib/evmone/eof.cpp
Outdated
{ | ||
auto code_idx = code_sections_worklist.front(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto code_idx = code_sections_worklist.front(); | |
const auto code_idx = code_sections_worklist.front(); |
Please rebase |
f8cc612
to
cb00a79
Compare
cb00a79
to
e8626d2
Compare
Rebased. Added a couple of tests for unreachable code sections in subcontainers. |