AVM: Only update the bytec disassembleState for bytecblock opcodes#6154
AVM: Only update the bytec disassembleState for bytecblock opcodes#6154jannotti merged 4 commits intoalgorand:masterfrom
Conversation
During disassembly if a contract includes a pushbytess opcode after the bytecblock, it will no longer overwrite the bytec disassembleState. This resulted in incorrect or missing comments for disassembled bytec opcodes.
|
I assume we have the same problem for |
Good thinking! Let me take a look and add the change for that too. |
|
As I did before, here was my local test. Test program: Before: After: |
jannotti
left a comment
There was a problem hiding this comment.
Love it. I'll wrangle another review.
cce
left a comment
There was a problem hiding this comment.
LGTM — btw, IMO bug fix PRs like this should include tests, so I took your before/after examples and turned them into one
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6154 +/- ##
==========================================
- Coverage 56.49% 56.25% -0.25%
==========================================
Files 499 494 -5
Lines 70029 69956 -73
==========================================
- Hits 39566 39354 -212
- Misses 27796 27935 +139
Partials 2667 2667
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
During disassembly, if a contract includes a
pushbytessopcode after thebytecblock, it will no longer overwrite the bytec disassembleState. This resulted in incorrect or missing comments for disassembledbytecopcodes.Of course, there is still the issue of someone using
bytecblockmultiple times, however that's easier to identify. This threw me for a while.Test program:
Before:
After: