-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Neo VM Optimization] Detect reference counter miscalculation. #3325
Conversation
|
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.
How can this happens in a real environment?
Now the tests can be passed, but I think nothing is really checked |
will add ut tests, still working on it. |
…ack-item * 'check-stack-item' of github.com:Jim8y/neo: fix all tests skip `if (!subItem.OnStack)` use ReferenceEqualityComparer for CompoundType # Conflicts: # src/Neo.VM/EvaluationStack.cs
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.
Too much HF and do not solve,as we discussed.
Do not merge for now.
With #3334 this is unnecesssary anymore |
Description
This pr checks the stackitems being pushed to the stack only contains items that are on the stack.
Why is this problem?
We can literarily create stackitems at anywhere in the execition engine and push it to the evaluation stack, it is highly possible that we construct compound type stackitems that also contain compound type, then when we push it to the stack, only the first demension subitem will be added to the reference counter, the second/higher demonsion subitems will be ignored.
Fixes # (issue)
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: