-
Notifications
You must be signed in to change notification settings - Fork 17
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
Deactivate memory tracking once freed #421
Conversation
I'm not sure I understand this one. Could you explain when such a pointer is going to be used? Also, I'm surprised the code in |
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.
Looks good to me!
Just cast the calls to owi_free
to void to get rid of the import type errors.
For example, change free in
Line 50 in aef0bd6
void free(void *ptr) { owi_free(ptr); } |
To
void free(void *ptr) { (void)owi_free(ptr); }
The rust allocator does a bunch of offset reads with a heap chunk when deallocating stuff. So in order to avoid having false positive heap overflows e when deallocating things in rust we need
free and realloc can remain the same I think |
I see. It would be great if we could start to test these things in Owi itself... @krtab there is a conflict that needs to be resolved before I can merge |
What do you suggest? I think for this case in particular it may be a bit difficult since we don't have the rust frontend atm |
I'm not suggesting anything for the current PR, but yes, it would be nice to have a small Rust frontend integrated in Owi for us to test this. |
Thanks! |
No description provided.