-
Bug
-
Resolution: Fixed
-
P4
-
20
-
b27
-
Verified
There are around 34 usages of DirectBuffer::address in the JDK code. While some of these usages have been vetted to take into account the possibility of buffers backed by shared memory segments (which can be closed asynchronously) - most are not.
Currently the code is defensive, and throws whenever a buffer backed by a shared segment is found.
Eyeballing all the use sites, it seems the vast majority is doing a trivial synchronous operation, inside a try/finally (with a reachability fence). We should replace these so that, if there's a segment, we keep its session alive using MemorySession::whileAlive.
Currently the code is defensive, and throws whenever a buffer backed by a shared segment is found.
Eyeballing all the use sites, it seems the vast majority is doing a trivial synchronous operation, inside a try/finally (with a reachability fence). We should replace these so that, if there's a segment, we keep its session alive using MemorySession::whileAlive.