-
Notifications
You must be signed in to change notification settings - Fork 344
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
dealloc error with dlmalloc >= 2.5 #2061
Comments
Thanks for the report! After a few tests, I think the issue here is in the Layout {
align: 1,
size: vec_capacity
} something like that, right? Well, the function simply discards the capacity of the allocation in favour of the length, which is the actually used and guaranteed initialized part of the capacity. Layout {
align: 1,
size: vec_len
} which is not the same layout (unless the (rather rare) condition of
Will write a patch to fix this up. |
dlmalloc (the default allocator for wasm) recently added some checks around deallocating memory (issue, relevant code). This is causing issues with cosmwasm, as can be seen in this MRE:
It looks like the issue is in how memory is
free
d inconsume_region
, but I'm not entirely sure what exactly.This is also reproducible with a bare contract with just an instantiate entry point, but I wanted to reduce it to the minimal code possible. this is all based off of cosmwasm 1.5.2. I have not tested other versions.
The text was updated successfully, but these errors were encountered: