Closed Bug 207425 Opened 23 years ago Closed 22 years ago

Memory leak in nsHTTPCompressConv.cpp

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jhpedemonte, Assigned: darin.moz)

Details

(Keywords: memory-leak)

Attachments

(1 file)

One of our customers was seeing a memory leak on the order of about 20 Mb every 5 to 10 minutes. Eventually, they would exhaust all their memory and mozilla would crash. This was on an OS/2 machine. They were also able to recreate the problem on a Win32 machine, but it took much longer for Mozilla to crash. Eventually, the issue was tracked to a memory leak in nsHTTPCompressConv.cpp. It appears that the code is inflating a string, but never getting a Z_STREAM_END.
This bug is very similar to the one in bug 198133. CCing those involved in that bug.
Attached patch fix leakSplinter Review
This patch greatly reduced the memory leaks seen by our customer. Of course, this is just a quick fix. The correct fix would be to figure out why the code is not getting Z_STREAM_END.
Comment on attachment 124397 [details] [diff] [review] fix leak I noticed that we weren't getting Z_STREAM_END there as well. Maybe this is why my netscape processes are hitting 150 megs over the course of a few days. sr=alecf lets get this in ASAP so we can see if this cleans up major leaks - darin is still gone for another week. doug, can you review this? When darin gets back we can double-check that this is the correct fix. If this is good on the 1.5alpha branch, I'd like to see if we can get this into 1.4final
Attachment #124397 - Flags: superreview+
Attachment #124397 - Flags: review?(dougt)
Comment on attachment 124397 [details] [diff] [review] fix leak darin sent me mail about this. r=dougt
Attachment #124397 - Flags: review?(dougt) → review+
cool, that was quick. Ok, I've landed this on the trunk (Well, I had to change the name of the Initialized/Ended variables to match the trunk) lets see what happens.
Comment on attachment 124397 [details] [diff] [review] fix leak Now that this is landed, I'd like to request that this goes into 1.4 - hopefully we're not too late!
Attachment #124397 - Flags: approval1.4?
Comment on attachment 124397 [details] [diff] [review] fix leak a=asa (on behalf of drivers) for checkin to the 1.4 branch.
Attachment #124397 - Flags: approval1.4? → approval1.4+
if this was checked in on 1.4 branch, should this be marked Fixed ?
Keywords: mlk
This was checked in everywhere.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: