[Neo VM Optimization] Detect reference counter miscalculation.#3325
Closed
Jim8y wants to merge 16 commits intoneo-project:masterfrom
Closed
[Neo VM Optimization] Detect reference counter miscalculation.#3325Jim8y wants to merge 16 commits intoneo-project:masterfrom
Jim8y wants to merge 16 commits intoneo-project:masterfrom
Conversation
14 tasks
Contributor
|
|
shargon
reviewed
Jun 11, 2024
Member
shargon
left a comment
There was a problem hiding this comment.
How can this happens in a real environment?
Contributor
|
Now the tests can be passed, but I think nothing is really checked |
Contributor
Author
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
shargon
reviewed
Jun 12, 2024
15 tasks
cschuchardt88
approved these changes
Jun 15, 2024
vncoelho
requested changes
Jun 15, 2024
Member
vncoelho
left a comment
There was a problem hiding this comment.
Too much HF and do not solve,as we discussed.
Do not merge for now.
Contributor
Author
|
With #3334 this is unnecesssary anymore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: