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 reallocating/memsetting the seed bytes on the heap each
time - eventually leaving the buffer unfreed .

I changed it so that the seedbytes only get allocated and zero'ed once.
The seed buffer size never changes between multiple attempts, so there is
certainly no need to reallocate. I also don't think we need to zero the bytes
again, given that we are generating random data into the buffer in the code
immediately below . In fact the initial zero'ing may be unnecessary too, unless
FIPS186 says we must do that as a precaution.
0
bugzilla
9/2/2005 2:58:07 AM
netscape.mozilla.reviewers 29156 articles. 0 followers. Follow

0 Replies
738 Views

Similar Articles

[PageSpeed] 28

Reply:

Similar Artilces:

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 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&...

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 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 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 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...

superreview requested: [Bug 205550] Mozilla WSDL leaks memory : [Attachment 144248] Possible fix
Johnny Stenback <jst@mozilla.jstenback.com> has asked Darin Fisher (IBM) <darin@meer.net> for superreview: Bug 205550: Mozilla WSDL leaks memory http://bugzilla.mozilla.org/show_bug.cgi?id=205550 Attachment 144248: Possible fix http://bugzilla.mozilla.org/attachment.cgi?id=144248&action=edit ------- Additional Comments from Johnny Stenback <jst@mozilla.jstenback.com> - In WSPCallContext::Abort(): + mCompletion = nsnull; You should add a comment where you do this to explain why it's needed so that we know to do this in other places too in the futur...

superreview requested: [Bug 294274] Memory leak if content sink appends script to node not in document : [Attachment 183695] Patch that fixes the XML leaks
Boris Zbarsky (gone June 3 -- June 30) <bzbarsky@mit.edu> has asked Peter Van der Beken <peterv@propagandism.org> for superreview: Bug 294274: Memory leak if content sink appends script to node not in document https://bugzilla.mozilla.org/show_bug.cgi?id=294274 Attachment 183695: Patch that fixes the XML leaks https://bugzilla.mozilla.org/attachment.cgi?id=183695&action=edit ------- Additional Comments from Boris Zbarsky (gone June 3 -- June 30) <bzbarsky@mit.edu> The PopContent() changes in the XML fragment sink are what fix the XML leaks. The XSLT changes...

superreview requested: [Bug 431404] Memory leak (n * 60 bytes) when tags are migrated from version 1 to 2 : [Attachment 319774] Fix the other leak
Mark Banner <bugzilla@standard8.plus.com> has asked neil@parkwaycc.co.uk <neil@httl.net> for superreview: Bug 431404: Memory leak (n * 60 bytes) when tags are migrated from version 1 to 2 https://bugzilla.mozilla.org/show_bug.cgi?id=431404 Attachment 319774: Fix the other leak https://bugzilla.mozilla.org/attachment.cgi?id=319774&action=edit ------- Additional Comments from Mark Banner <bugzilla@standard8.plus.com> Fixes the one on line 415. Note you may need "The fix v2" applied before applying this one. I also created a temporary variable for the ...

superreview requested: [Bug 431404] Memory leak (n * 60 bytes) when tags are migrated from version 1 to 2 : [Attachment 319777] Fix the other leak v2
Mark Banner <bugzilla@standard8.plus.com> has asked neil@parkwaycc.co.uk <neil@httl.net> for superreview: Bug 431404: Memory leak (n * 60 bytes) when tags are migrated from version 1 to 2 https://bugzilla.mozilla.org/show_bug.cgi?id=431404 Attachment 319777: Fix the other leak v2 https://bugzilla.mozilla.org/attachment.cgi?id=319777&action=edit ------- Additional Comments from Mark Banner <bugzilla@standard8.plus.com> Correct, we would have to free the preference ones as well. ...

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 ...

Web resources about - superreview requested: [Bug 306785] memory leaks in PQG_ParamGenSeedLen : [Attachment 194622] fix for memory leaks - netscape.mozilla.reviewers

Resources last updated: 12/13/2015 6:55:43 AM