-
Notifications
You must be signed in to change notification settings - Fork 11.6k
[move][move-vm][rewrite][cleanup 2/n] Add limits to arena and string interner #21050
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
9730949
to
87b80cc
Compare
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.
Overall looks good, although I'm worried there might be a possible leak in alloc_slice
std::ptr::copy_nonoverlapping(items.as_ptr(), mut_ptr, len); | ||
} | ||
|
||
// Prevent the original vector from dropping its data | ||
std::mem::forget(items); |
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.
This doesn't seem right to me. Since we're copying the elements of items
over and then the std::mem::forget
on items
will leak them. I think this should be an explicit drop
no?
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.
Agreed -- see the follow-on PR.
external-crates/move/crates/move-vm-runtime/src/cache/identifier_interner.rs
Outdated
Show resolved
Hide resolved
There does appear to be a possible memory leak. I have updated bumpalo and reverted the change in this PR. There will be a new PR that does things appropriately. |
ca7cf22
to
dbcd7d5
Compare
…interner (#21050) ## Description This sets limits for arenas and the string interner, producing errors if allocation fails. ## Test plan All tests still pass --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] gRPC: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK:
) This sets limits for arenas and the string interner, producing errors if allocation fails. All tests still pass --- Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] gRPC: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK:
Description
This sets limits for arenas and the string interner, producing errors if allocation fails.
Test plan
All tests still pass
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.