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

Closed
ghost opened this Issue Jan 12, 2013 · 0 comments

Projects

None yet

0 participants

@ghost
ghost commented Jan 12, 2013

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.

@ghost Unknown added a commit that closed this issue Jan 12, 2013
Wayne Meissner Fix #494 by moving the sentinel nulling until after freeing the nativ…
…e memory allocation.
7f721ee
@ghost ghost closed this in 7f721ee Jan 12, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment