-
Notifications
You must be signed in to change notification settings - Fork 0
fuzz v1 and fix #368
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
fuzz v1 and fix #368
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.
The changes introduce a new copying mechanism for state, which is a good improvement. However, there are several issues with the implementation. A key issue is the incorrect handling of mutable state in the new copy initializer for ServiceAccountsMutRef, which leads to shared mutable state instead of a true copy. Additionally, there's a potentially incorrect clearing of state changes in Accumulation.swift and some inefficient lazy initialization patterns have been introduced in HostCalls.swift.
Blockchain/Sources/Blockchain/RuntimeProtocols/Accumulation.swift
Outdated
Show resolved
Hide resolved
Blockchain/Sources/Blockchain/VMInvocations/HostCall/HostCalls.swift
Outdated
Show resolved
Hide resolved
Blockchain/Sources/Blockchain/VMInvocations/InvocationContexts/AccumulateContext.swift
Show resolved
Hide resolved
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.
Found a mutability/shadowing bug when building a dictionary in Bless, and an unsafe force-cast plus aliasing of mutable state in ServiceAccounts copy initializer.
Blockchain/Sources/Blockchain/VMInvocations/HostCall/HostCalls.swift
Outdated
Show resolved
Hide resolved
|
No issues found |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #368 +/- ##
==========================================
- Coverage 81.96% 81.74% -0.22%
==========================================
Files 381 381
Lines 33758 33912 +154
==========================================
+ Hits 27670 27723 +53
- Misses 6088 6189 +101 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Found multiple correctness and robustness issues in the changed code, including a likely compile error in HostCalls optional binding and logic regression, inconsistent error handling between target and client, a forced unwrap that can crash, and a potentially incorrect use of try on a non-throwing initializer.
No description provided.