Last Comment Bug 698075 - Potential memory leak in AsyncChannel::Echo(), ::Send()
: Potential memory leak in AsyncChannel::Echo(), ::Send()
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: IPC (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla11
Assigned To: Niko Matsakis [:nmatsakis]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-28 13:02 PDT by Niko Matsakis [:nmatsakis]
Modified: 2012-02-01 13:58 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Convert affected functions to use nsAutoptr<> and thus guarantee msg is freed (1.91 KB, patch)
2011-10-28 13:04 PDT, Niko Matsakis [:nmatsakis]
no flags Details | Diff | Splinter Review
Add use of nsAutoPtr<> into RPCChannel::Call (2.57 KB, patch)
2011-10-28 16:53 PDT, Niko Matsakis [:nmatsakis]
cjones.bugs: review+
Details | Diff | Splinter Review

Description Niko Matsakis [:nmatsakis] 2011-10-28 13:02:23 PDT
These methods take ownership of the Message* parameter, but in the case of error they do not delete it.
Comment 1 Niko Matsakis [:nmatsakis] 2011-10-28 13:04:28 PDT
Created attachment 570336 [details] [diff] [review]
Convert affected functions to use nsAutoptr<> and thus guarantee msg is freed
Comment 2 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2011-10-28 16:36:00 PDT
Comment on attachment 570336 [details] [diff] [review]
Convert affected functions to use nsAutoptr<> and thus guarantee msg is freed

The same fix is needed in RPCChannel::Call.

Please add that, then post another version of the patch and re-request review from me.  This looks good otherwise.
Comment 3 Niko Matsakis [:nmatsakis] 2011-10-28 16:53:04 PDT
Created attachment 570422 [details] [diff] [review]
Add use of nsAutoPtr<> into RPCChannel::Call
Comment 4 Mozilla RelEng Bot 2011-11-28 14:10:26 PST
Try run for 2c4a388f862d is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=2c4a388f862d
Results (out of 247 total builds):
    exception: 1
    success: 226
    warnings: 16
    failure: 4
Builds available at http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/nmatsakis@mozilla.com-2c4a388f862d
Comment 5 Mozilla RelEng Bot 2011-11-28 14:40:28 PST
Try run for 4d691c3173e6 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=4d691c3173e6
Results (out of 247 total builds):
    exception: 1
    success: 225
    warnings: 16
    failure: 5
Builds available at http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/nmatsakis@mozilla.com-4d691c3173e6
Comment 6 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2011-11-28 15:27:04 PST
For the run in comment 4, the whole enchilada, here's the breakdown.

 - https://tbpl.mozilla.org/?tree=Try&rev=2c4a388f862d is the link you want
 - the "Linux debug" M (... 2 ...) "orange" doesn't look familiar.  I requested another run using the "+" button in the bottom-middle of TBPL.
 - the red "JP" tests, jetpack, are broken so often that no one pays attention to them.  Sad state of affairs.  No harm done by your patch patches.
 - the "Win debug" M(1 ...) "orange" doesn't look familiar either, so I requested another run.

If the linux Md2 (mochitest, debug, part 2) and windows Md1 (mochitest, debug, part 1) runs come back green, I would recommend landing.  Otherwise we probably have a bug to chase down.
Comment 7 Niko Matsakis [:nmatsakis] 2011-11-29 15:15:47 PST
Looks like both came back green.  I will therefore push the patch (once I figure out how).
Comment 8 Ed Morley [:emorley] 2011-11-30 05:28:47 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a01206eba24

To save time for future patches (this one is fine for now), could you set your hgrc to include the author automatically & also add a commit message, along the lines of:
https://developer.mozilla.org/en/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F

Thanks :-)
Comment 9 Marco Bonardo [::mak] 2011-12-01 04:38:55 PST
https://hg.mozilla.org/mozilla-central/rev/1a01206eba24

Note You need to log in before you can comment on or make changes to this bug.