Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix instruction tracing of EOF code #536

Merged
merged 2 commits into from
Dec 7, 2022
Merged

Fix instruction tracing of EOF code #536

merged 2 commits into from
Dec 7, 2022

Conversation

gumb0
Copy link
Member

@gumb0 gumb0 commented Dec 6, 2022

After #531 tracer gets state.original_code and then uses PC value to get an opcode from this code, which is incorrect for EOF.

I don't have a fix yet, but wrote a test.

@chfast chfast requested review from chfast and rodiazet December 6, 2022 22:12
Keep the size of the executable code section in the analysis result
so that the tracer receives correct information about the running code.
@codecov
Copy link

codecov bot commented Dec 6, 2022

Codecov Report

Merging #536 (ec2ea9f) into master (83ad7bc) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #536      +/-   ##
==========================================
+ Coverage   97.99%   98.03%   +0.03%     
==========================================
  Files          59       59              
  Lines        5681     5687       +6     
==========================================
+ Hits         5567     5575       +8     
+ Misses        114      112       -2     
Flag Coverage Δ
blockchaintests 78.15% <44.44%> (-0.24%) ⬇️
statetests 72.76% <44.44%> (-0.15%) ⬇️
unittests 91.71% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/evmone/baseline.cpp 100.00% <100.00%> (ø)
lib/evmone/baseline.hpp 100.00% <100.00%> (ø)
lib/evmone/instructions.hpp 100.00% <100.00%> (+0.21%) ⬆️
test/unittests/tracing_test.cpp 100.00% <100.00%> (ø)
lib/evmone/advanced_analysis.hpp 100.00% <0.00%> (+2.94%) ⬆️

@gumb0 gumb0 marked this pull request as ready for review December 7, 2022 10:26
@gumb0 gumb0 merged commit 6d03f5d into master Dec 7, 2022
@gumb0 gumb0 deleted the fix-eof-tracing branch December 7, 2022 11:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants