-
Notifications
You must be signed in to change notification settings - Fork 313
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
eof: Detect unused inputs #1122
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1122 +/- ##
===========================================
- Coverage 94.29% 25.54% -68.76%
===========================================
Files 159 159
Lines 17343 17352 +9
===========================================
- Hits 16354 4432 -11922
- Misses 989 12920 +11931
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -1241,11 +1241,11 @@ TEST_F(eof_validation, jumpf_to_nonreturning) | |||
|
|||
// Exactly required inputs on stack at JUMPF | |||
add_test_case(eof_bytecode(3 * OP_PUSH0 + jumpf(1), 3).code(OP_STOP, 3, 0x80, 3), | |||
EOFValidationError::success); | |||
EOFValidationError::unused_input); |
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.
not necessarily urgent, but leaving a comment to not miss - we may maybe want to move such unused_input
cases to their separate batch of tests, and rewrite these variants to actually have them use the inputs.
Or, maybe actually writing these tests now could be useful to get more insight into what the change entails.
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.
That's the plan. I only wanted to list all affected tests.
another observation - Ah, I see in the |
No. It only breaks similar |
We will not do this. |
@chfast did we settle on whether or not we need new RETF EEST tests. IIUC none broke when you implemented this? |
Add one more EOF validation rule: all code section inputs must be used. This is validated by tracking if any instruction in the code section reaches the stack bottom (height 0).
Spec issue: ipsilon/eof#176.