This repository has been archived by the owner on Jul 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
heap_size_of
should be unsafe
#9
Comments
This is true! |
Is |
No, only dereferencing it is. |
|
cool 🍹 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It draws attention directly by being marked safe but using a raw pointer argument.
It seems trivial to segfault using this function in safe rust, just give it a pointer to something not allocated, or a dangling pointer.
Tested using heapsize 0.1.0
The text was updated successfully, but these errors were encountered: