-
Notifications
You must be signed in to change notification settings - Fork 97
fix(memory_instance): zero out heap memory when reallocating after reset #941
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
49161d4 to
08f5902
Compare
cf064fe to
b03c9b2
Compare
| macro_rules! generate_memory_instance_grow_by_heap_tests { | ||
| ($($size:expr),*) => { | ||
| $( | ||
| generate_memory_instance_grow_by_heap_test!($size); | ||
| )* | ||
| }; | ||
| } |
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.
nit: Can we name these macros:
generate_tests__memory_instance__grow_heap_by_after_reset__does_not_retain_dirty_memory_size
and
generate_test__memory_instance__grow_heap_by_after_reset__does_not_retain_dirty_memory_size
or something that makes it abundantly clear that these macros are generating tests. It's just not the expected format as a reader.
I wish there was a way to do this with prop_test, but you need to know the sizes at compile time, so I don't think that's supported.
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.
I wish there was a way to do this with prop_test, but you need to know the sizes at compile time, so I don't think that's supported
exactly why I went with this approach
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.
addressed in 868938d
…e executions (#2963) ## Linked Issues/PRs <!-- List of related issues/PRs --> - vm pr: FuelLabs/fuel-vm#941 ## Description <!-- List of detailed changes --> adds a test with 2 predicates in one transaction, one that writes to the heap and one that reallocates and reads from it. it should be zeroed out. ## Checklist - [ ] Breaking changes are clearly marked as such in the PR description and changelog - [ ] New behavior is reflected in tests - [ ] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [ ] I have reviewed the code myself - [ ] I have created follow-up issues caused by this PR and linked them here ### After merging, notify other teams [Add or remove entries as needed] - [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/) - [ ] [Sway compiler](https://github.com/FuelLabs/sway/) - [ ] [Platform documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+) (for out-of-organization contributors, the person merging the PR will do this) - [ ] Someone else? Co-authored-by: xgreenx <[email protected]>
[Link to related issue(s) here, if any]
[Short description of the changes.]
Checklist
Before requesting review
After merging, notify other teams
[Add or remove entries as needed]