superreview requested: [Bug 431414] Review MailNews uses of idl functions that return xpcom allocated arrays [..., array, ...] for memory leaks : [Attachment 318566] Fix memory leaks

Mark Banner <bugzilla@standard8.plus.com> has asked Dan Mosedale
<dmose@mozilla.org> for superreview:
Bug 431414: Review MailNews uses of idl functions that return xpcom allocated
arrays [..., array, ...] for memory leaks
https://bugzilla.mozilla.org/show_bug.cgi?id=431414

Attachment 318566: Fix memory leaks
https://bugzilla.mozilla.org/attachment.cgi?id=318566&action=edit

------- Additional Comments from Mark Banner <bugzilla@standard8.plus.com>
This fixes the memory leaks I have found by going through:

http://mxr.mozilla.org/seamonkey/search?string=array&find=%5C.idl%24&findi=&fil
ter=&hitlimit=&tree=seamonkey

and checking the c++ callers of those functions. The only ones I didn't check
were the callers of the functions in nsICollation because they are intertwined
with mork, and DB Views etc, and it would make much better sense to use a tool
to check those.

So of the leaks I found, nsDogbertProfileMigrator will obviously leak but
typically that'll be a one-off case.

I'm not sure if nsLDAPAutoCompleteSession would really leak its mSearchAttrs or
not, but I added the check just in case we start re-using it in strange ways.

The worst ones I found doing this check are probably
nsMsgDBFolder::ClearNewMessages and nsMsgDBFolder::CallFilterPlugins. Each of
these will leak a PRUint32 (4 bytes typically) per new message received on any
protocol. So depending on how many messages a person get, how bad this leak is
will vary. If you get a 1000 new posts/messages a day, then you're probably
looking at an 8k leak. Not very significant, but its a start to clearing up
mailnews.
0
bugzilla
4/30/2008 8:57:17 AM
mozilla.dev.super-review 29307 articles. 3 followers. Post Follow

0 Replies
689 Views

Similar Articles

[PageSpeed] 3

Reply:

Similar Artilces:

superreview granted: [Bug 431414] Review MailNews uses of idl functions that return xpcom allocated arrays [..., array, ...] for memory leaks : [Attachment 318566] Fix memory leaks
neil@parkwaycc.co.uk <neil@httl.net> has granted Mark Banner <bugzilla@standard8.plus.com>'s request for superreview: Bug 431414: Review MailNews uses of idl functions that return xpcom allocat= ed arrays [..., array, ...] for memory leaks https://bugzilla.mozilla.org/show_bug.cgi?id=3D431414 Attachment 318566: Fix memory leaks https://bugzilla.mozilla.org/attachment.cgi?id=3D318566&action=3Dedit ------- Additional Comments from neil@parkwaycc.co.uk <neil@httl.net> >+ // Ensure any old data is freed if necessary.=0D >+ if (mSearchAttrs) {=0D ...

superreview granted: [Bug 431414] Review MailNews uses of idl functions that return xpcom allocated arrays [..., array, ...] for memory leaks : [Attachment 319371] Fix memory leaks v2
Mark Banner <bugzilla@standard8.plus.com> has granted superreview: Bug 431414: Review MailNews uses of idl functions that return xpcom allocated arrays [..., array, ...] for memory leaks https://bugzilla.mozilla.org/show_bug.cgi?id=431414 Attachment 319371: Fix memory leaks v2 https://bugzilla.mozilla.org/attachment.cgi?id=319371&action=edit ------- Additional Comments from Mark Banner <bugzilla@standard8.plus.com> Fixes Neil's comments, carrying forward his sr. ...

superreview requested: [Bug 306785] memory leaks in PQG_ParamGenSeedLen : [Attachment 194622] fix for memory leaks
Julien Pierre <julien.pierre.bugs@sun.com> has asked Robert Relyea <rrelyea@redhat.com> for superreview: Bug 306785: memory leaks in PQG_ParamGenSeedLen https://bugzilla.mozilla.org/show_bug.cgi?id=306785 Attachment 194622: fix for memory leaks https://bugzilla.mozilla.org/attachment.cgi?id=194622&action=edit ------- Additional Comments from Julien Pierre <julien.pierre.bugs@sun.com> I have tested this and verified the 2 leaks are gone. all.sh still passes. I'm not 100% sure that my change in getPQseed is correct . The code was previously freeing and re...

superreview requested: [Bug 429230] memory leak in pkix_CheckCert function : [Attachment 315876] Patch v1(remove debug code that leaks memory)
Alexei Volkov <alexei.volkov.bugs@sun.com> has asked Kai Engert (:kaie) <kengert@redhat.com> for superreview: Bug 429230: memory leak in pkix_CheckCert function https://bugzilla.mozilla.org/show_bug.cgi?id=429230 Attachment 315876: Patch v1(remove debug code that leaks memory) https://bugzilla.mozilla.org/attachment.cgi?id=315876&action=edit ------- Additional Comments from Alexei Volkov <alexei.volkov.bugs@sun.com> Nominating the bug for 3.12.0. checkerCheck(a pointer to pkix_PolicyChecker_Check) will throw an error in case when cert does not pass the che...

superreview requested: [Bug 397832] libpkix leaks memory if a macro calls a function that returns an error : [Attachment 310353] Object leak test(patch v3)
Alexei Volkov <alexei.volkov.bugs@sun.com> has asked Nelson Bolyard <nelson@bolyard.com> for superreview: Bug 397832: libpkix leaks memory if a macro calls a function that returns an error https://bugzilla.mozilla.org/show_bug.cgi?id=397832 Attachment 310353: Object leak test(patch v3) https://bugzilla.mozilla.org/attachment.cgi?id=310353&action=edit ------- Additional Comments from Alexei Volkov <alexei.volkov.bugs@sun.com> Changes according review comments. ...

superreview requested: [Bug 397832] libpkix leaks memory if a macro calls a function that returns an error : [Attachment 310352] Object leak test(patch v2)
Alexei Volkov <alexei.volkov.bugs@sun.com> has asked Nelson Bolyard <nelson@bolyard.com> for superreview: Bug 397832: libpkix leaks memory if a macro calls a function that returns an error https://bugzilla.mozilla.org/show_bug.cgi?id=397832 Attachment 310352: Object leak test(patch v2) https://bugzilla.mozilla.org/attachment.cgi?id=310352&action=edit ------- Additional Comments from Alexei Volkov <alexei.volkov.bugs@sun.com> Changes according review comments. ...

superreview requested: [Bug 149110] Memory leak of 20 bytes from 1 block allocated in nsMsgKeySet::Create(char const*) : [Attachment 127659] fix leak [@@ -1845,7 +1847,10 @@]
timeless@myrealbox.com <timeless@bemail.org> has asked bienvenu@netscape.com for superreview: Bug 149110: Memory leak of 20 bytes from 1 block allocated in nsMsgKeySet::Create(char const*) http://bugzilla.mozilla.org/show_bug.cgi?id=149110 Attachment 127659: fix leak [@@ -1845,7 +1847,10 @@] http://bugzilla.mozilla.org/attachment.cgi?id=127659&action=edit ...

superreview requested: [Bug 149110] Memory leak of 20 bytes from 1 block allocated in nsMsgKeySet::Create(char const*) : [Attachment 135201] -w the leak is fixed by the change to nsMsgNewsFolder::Sh
timeless@myrealbox.com <timeless@bemail.org> has asked David Bienvenu <bienvenu@nventure.com> for superreview: Bug 149110: Memory leak of 20 bytes from 1 block allocated in nsMsgKeySet::Create(char const*) http://bugzilla.mozilla.org/show_bug.cgi?id=149110 Attachment 135201: -w the leak is fixed by the change to nsMsgNewsFolder::Shutdown http://bugzilla.mozilla.org/attachment.cgi?id=135201&action=edit ...

superreview granted: [Bug 306785] memory leaks in PQG_ParamGenSeedLen : [Attachment 194622] fix for memory leaks
Robert Relyea <rrelyea@redhat.com> has granted Julien Pierre <julien.pierre.bugs@sun.com>'s request for superreview: Bug 306785: memory leaks in PQG_ParamGenSeedLen https://bugzilla.mozilla.org/show_bug.cgi?id=306785 Attachment 194622: fix for memory leaks https://bugzilla.mozilla.org/attachment.cgi?id=194622&action=edit ------- Additional Comments from Robert Relyea <rrelyea@redhat.com> Your code is correct wrt getPQseed(). We know seedBytes doesn't change, so it's clearly a waste to allocate each time through. bob ...

superreview requested: [Bug 305017] Memory Leak: myspell object gets leaked : [Attachment 192990] the fix
Scott MacGregor <mscott@mozilla.org> has asked David Bienvenu <bienvenu@nventure.com> for superreview: Bug 305017: Memory Leak: myspell object gets leaked https://bugzilla.mozilla.org/show_bug.cgi?id=305017 Attachment 192990: the fix https://bugzilla.mozilla.org/attachment.cgi?id=192990&action=edit ...

superreview granted: [Bug 429230] memory leak in pkix_CheckCert function : [Attachment 315876] Patch v1(remove debug code that leaks memory)
Kai Engert (:kaie) <kengert@redhat.com> has granted Alexei Volkov <alexei.volkov.bugs@sun.com>'s request for superreview: Bug 429230: memory leak in pkix_CheckCert function https://bugzilla.mozilla.org/show_bug.cgi?id=429230 Attachment 315876: Patch v1(remove debug code that leaks memory) https://bugzilla.mozilla.org/attachment.cgi?id=315876&action=edit ------- Additional Comments from Kai Engert (:kaie) <kengert@redhat.com> You remove a lot of code, is that all equivalent to PKIX_CHECK ? ...

superreview requested: [Bug 212269] Memory leak on continuous reloading : [Attachment 127484] fix DOM Style leak
David Baron <dbaron@dbaron.org> has asked Boris Zbarsky <bzbarsky@mit.edu> for superreview: Bug 212269: Memory leak on continuous reloading http://bugzilla.mozilla.org/show_bug.cgi?id=212269 Attachment 127484: fix DOM Style leak http://bugzilla.mozilla.org/attachment.cgi?id=127484&action=edit ...

superreview requested: [Bug 262758] live bookmarks leak memory/RDF resources : [Attachment 161801] 262758-livemark-refresh-leaks-memory-0.patch
vladimir@pobox.com has asked Mike Shaver <shaver@mozilla.org> for superreview: Bug 262758: live bookmarks leak memory/RDF resources https://bugzilla.mozilla.org/show_bug.cgi?id=262758 Attachment 161801: 262758-livemark-refresh-leaks-memory-0.patch https://bugzilla.mozilla.org/attachment.cgi?id=161801&action=edit ...

superreview requested: [Bug 297592] Need a JSS Selfserv test for checking memory leaks : [Attachment 189371] JSS_SelfServServer and JSS_SelfServClient program for testing memory leaks
Sandeep Konchady <Sandeep.Konchady@Sun.COM> has asked glen beasley <glen.beasley@sun.com> for superreview: Bug 297592: Need a JSS Selfserv test for checking memory leaks https://bugzilla.mozilla.org/show_bug.cgi?id=297592 Attachment 189371: JSS_SelfServServer and JSS_SelfServClient program for testing memory leaks https://bugzilla.mozilla.org/attachment.cgi?id=189371&action=edit ------- Additional Comments from Sandeep Konchady <Sandeep.Konchady@Sun.COM> JSS_SelfServServer.java and JSS_SelfServClient.java are server and client using JSS that can takein a pred...

Web resources about - superreview requested: [Bug 431414] Review MailNews uses of idl functions that return xpcom allocated arrays [..., array, ...] for memory leaks : [Attachment 318566] Fix memory leaks - mozilla.dev.super-review

Resources last updated: 12/4/2015 9:13:28 AM