Skip to content

FFI::MemoryPointer#free may cause JVM crashes #494

@ghost

Description

FFI::MemoryPointer#free() eventually invokes CachingNativeMemoryAllocator.AllocatedMemoryIO.free(), which frees the native memory. In doing so, it also nulls out a keep-alive referent, but does so before it frees the native memory, not after, which can possibly lead to that memory chunk being recycled into another allocation, and then freed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions