Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

heap_size_of should be unsafe #9

Closed
@bluss

Description

@bluss

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

heapsize::heap_size_of(2 as *const _);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions