Skip to content

Heap::dealloc is unsound #37

@nikitax44

Description

@nikitax44

it is possible to cause segfault in entirely safe code:

fn main() {
    let mut heap = buddy_system_allocator::Heap<10>::new();
    heap.dealloc(
        std::ptr::NonNull::dangling(),
        std::alloc::Layout::from_size_align(1, 1).unwrap(),
    );
}

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