-
Notifications
You must be signed in to change notification settings - Fork 389
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
fix(gnovm): Make GnoVM slice allocations before go runtime allocations #2781
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2781 +/- ##
=======================================
Coverage 60.44% 60.44%
=======================================
Files 563 563
Lines 75157 75154 -3
=======================================
+ Hits 45426 45430 +4
+ Misses 26341 26335 -6
+ Partials 3390 3389 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
LGTM!
This is to fix the first issue mentioned in #2738.
In short, when allocating and reallocating slices' underlying arrays, the VM was building the
TypedValue
slice before making the necessary VM allocations. It is important the VM allocations be done before theTypedValue
allocations to ensure the values being allocated won't exceed the VM's limit. In extreme cases, unchecked allocations resulted in the VM hanging as it tried to allocate massiveTypedValue
slices in the go runtime.Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description