Blake Bender created GEODE-7299:
-----------------------------------

             Summary: Memory leak in PdxInstanceImpl::updatePdxStream
                 Key: GEODE-7299
                 URL: https://issues.apache.org/jira/browse/GEODE-7299
             Project: Geode
          Issue Type: Bug
          Components: native client
            Reporter: Blake Bender


The `PdxInstanceImpl::updatePdxStream` method assigns the result of 
`DataInput::getBufferCopy` to its `m_buffer` member variable, but `m_buffer` is 
deleted by `PdxInstanceImpl` in its destructor, implying that `PdxInstanceImpl` 
owns the pointer, which means, in this case, that the existing `m_buffer`, if 
there is one, is leaked in this call.  We discovered that `updatePdxStream` is 
called on every put of a Pdx type, so in a tight loop with a lot of puts we are 
potentially leaking _a lot_ of memory.

 

Repro steps:

Run the soon-to-be-implemented `LeakPdxMemory` test in the NC integration test 
suite.  Test will attempt to do a large number of puts of a large Pdx object, 
and look for an out of memory exception.

 

Expected result:

Test passes

 

Actual result:

Test fails.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to