Closed Bug 109501 Opened 23 years ago Closed 23 years ago

Memory leak of 2048 bytes from 1 block allocated in PR_Malloc

Categories

(Core :: Networking, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

VERIFIED WORKSFORME
mozilla0.9.9

People

(Reporter: stephend, Assigned: neeti)

Details

Windows 2000, just reading 2 IMAP messages with 2 JPG attachments.

    [W] MLK: Memory leak of 2048 bytes from 1 block allocated in PR_Malloc
        Distribution of leaked blocks
        Allocation location
        malloc         [msvcrt.DLL]
        PR_Malloc      [nspr4.dll]
        nsSegmentedBuffer::AppendNewSegment(void) [nsSegmentedBuffer.cpp:117]
                mSegmentArrayCount = newArraySize;
            }
        
     =>     char* seg = (char*)mSegAllocator->Alloc(mSegmentSize);
            if (seg == nsnull) {
                return nsnull;
            }
        nsPipe::GetWriteSegment(char * *,UINT *) [nsPipe2.cpp:302]
            *resultSegmentLen = 0;
            if (mWriteCursor == nsnull ||
                mWriteCursor == mWriteLimit) {
     =>         char* seg = mBuffer.AppendNewSegment();
                if (seg == nsnull) {
                    // buffer is full
                    return NS_OK;
        nsPipe::nsPipeOutputStream::WriteSegments((*)(nsIOutputStream *,void 
*,char *,UINT,UINT,UINT *),void *,UINT,UINT *) [nsPipe2.cpp:696]
                while (amt > 0) {
                    PRUint32 writeBufLen;
                    char* writeBuf;
     =>             rv = pipe->GetWriteSegment(&writeBuf, &writeBufLen);
                    if (NS_FAILED(rv))
                        goto done;
                    if (writeBufLen == 0) {
        nsPipe::nsPipeOutputStream::WriteFrom(nsIInputStream *,UINT,UINT *) 
[nsPipe2.cpp:852]
        nsPipe::nsPipeOutputStream::WriteFrom(nsIInputStream* fromStream,
                                              PRUint32 count,
                                              PRUint32 *writeCount)
     => {
            return WriteSegments(nsReadFromInputStream, fromStream, count, 
writeCount);
        }
        
        nsSocketReadRequest::OnRead(void) [nsSocketTransport.cpp:2767]
                                            mContext,
                                            mInputStream,
                                            offset,
     =>                                     amount);
        
            LOG(("nsSocketReadRequest: listener returned [rv=%x]\n", rv));
        
    nsSocketTransport::doReadWrite(short) [nsSocketTransport.cpp:1037]
                        // we must not call out to our listener with the 
monitor held.  mReadRequest
                        // can only be cleared on this thread, so releasing the 
monitor should be safe.
                        PR_ExitMonitor(mMonitor);
     =>                 readStatus = mReadRequest->OnRead();
                        PR_EnterMonitor(mMonitor);
                        if (mReadRequest->IsSuspended()) {
                            mSelectFlags &= ~PR_POLL_READ;
    nsSocketTransport::Process(short) [nsSocketTransport.cpp:518]
                    LOG(("nsSocketTransport: Transport [host=%s:%d this=%x] "
                         "is in WaitReadWrite state [readtype=%x writetype=%x 
status=%x].\n",
                        mHostName, mPort, this, GetReadType(), GetWriteType(), 
mStatus));
     =>             mStatus = doReadWrite(aSelectFlags);
                    break;
        
                case eSocketState_Timeout:
    ???            [ip=0x09013a38]
    nsSocketTransportService::Run(void) [nsSocketTransportService.cpp:505]
                pfd->out_flags = 0;
        
                if (transport) {
     =>           rv = transport->Process(out_flags);
                  if (NS_BASE_STREAM_WOULD_BLOCK == rv) {
                    // Update the select flags...
                    pfd->in_flags = transport->GetSelectFlags();
Target Milestone: --- → mozilla0.9.9
I don't see this anymore running Purify under Windows 2000, same testcase.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
verified wfm.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.