New issue
Advanced search Search tips

Issue 717688 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

DiscardableSharedMemory should Unmap() and Close() its shared memory handle on destruction.

Project Member Reported by erikc...@chromium.org, May 2 2017

Issue description

Failing to do so can cause a leak. For an obvious example, see 
TEST(DiscardableSharedMemoryTest, CreateFromHandle) {
https://cs.chromium.org/chromium/src/base/memory/discardable_shared_memory_unittest.cc?q=base/memory/discardable_shared_memory_unittest.cc+package:%5Echromium$&l=52

The root cause of this is unclear ownership semantics for the handle in SharedMemoryHandle. Unfortunately, this can't be fixed without a really large refactor.
 

Sign in to add a comment