Closed
Bug 453137
Opened 18 years ago
Closed 17 years ago
'TestPipes' |TestChainedPipes()| leaks its streams
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b1
People
(Reporter: sgautherie, Assigned: sgautherie)
References
Details
(Keywords: memory-leak)
Attachments
(1 file, 1 obsolete file)
|
15.35 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b1pre) Gecko/20080901134927 SeaMonkey/2.0a1pre] (home, optim default) (W2Ksp4)
| Assignee | ||
Comment 1•18 years ago
|
||
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b1pre) Gecko/20080901134927 SeaMonkey/2.0a1pre] (home, optim default) (W2Ksp4)
*[unrelated] Reorder a few lines.
*Add missing |NS_RELEASE(...);| !
***
Note that this function (and others) does not handle correctly its early returns.
If you want this fixed too, I would suggest "goto + NS_IF_RELEASE()" :-|
What do you think ?
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
Attachment #336345 -
Flags: superreview?(shaver)
Attachment #336345 -
Flags: review?(shaver)
| Assignee | ||
Comment 2•18 years ago
|
||
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b1pre) Gecko/20080901134927 SeaMonkey/2.0a1pre] (home, optim default) (W2Ksp4)
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b1pre) Gecko/20080901143156 SeaMonkey/2.0a1pre] (home, debug default) (W2Ksp4)
I wonder why |make check| reports a leak of 2 only, instead of 4 (when run directly).
I'll look into this after this patch...
Updated•18 years ago
|
Attachment #336345 -
Flags: superreview?(shaver)
Attachment #336345 -
Flags: review?(shaver)
Comment 3•18 years ago
|
||
Comment on attachment 336345 [details] [diff] [review]
(Av1) <TestPipes.cpp>
I'm not a good choice for general XPCOM first-review these days, due to my workload.
| Assignee | ||
Updated•18 years ago
|
Attachment #336345 -
Flags: superreview?(benjamin)
Attachment #336345 -
Flags: review?(benjamin)
Comment 4•17 years ago
|
||
Comment on attachment 336345 [details] [diff] [review]
(Av1) <TestPipes.cpp>
If you're going to alter this test, please refactor it with nsCOMPtrs.
Attachment #336345 -
Flags: superreview?(benjamin)
Attachment #336345 -
Flags: review?(benjamin)
Attachment #336345 -
Flags: review-
| Assignee | ||
Comment 5•17 years ago
|
||
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b1pre) Gecko/20080917032624 Minefield/3.1b1pre] (home, optim default) (W2Ksp4)
Av1, with comment 4 suggestion(s).
I made it available in no-debug build too.
NB: First time I use nsCOMPtr, please double check.
PS: I don't know if you want to do something about the |#ifdef 0| code(s), either way...
Attachment #336345 -
Attachment is obsolete: true
Attachment #339333 -
Flags: review?(benjamin)
| Assignee | ||
Comment 6•17 years ago
|
||
(In reply to comment #5)
> I made it available in no-debug build too.
s/ no-debug / libxul-enabled /
Updated•17 years ago
|
Attachment #339333 -
Flags: review?(benjamin) → review+
| Assignee | ||
Comment 7•17 years ago
|
||
Comment on attachment 339333 [details] [diff] [review]
(Av2) <TestPipes.cpp>
[Checkin: Comment 7]
http://hg.mozilla.org/mozilla-central/rev/cdfaac3ff235
Attachment #339333 -
Attachment description: (Av2) <TestPipes.cpp> → (Av2) <TestPipes.cpp>
[Checkin: Comment 7]
| Assignee | ||
Comment 8•17 years ago
|
||
(In reply to comment #5)
> PS: I don't know if you want to do something about the |#ifdef 0| code(s),
I filed bug 457046.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
| Assignee | ||
Comment 9•17 years ago
|
||
(In reply to comment #7)
> (From update of attachment 339333 [details] [diff] [review])
> http://hg.mozilla.org/mozilla-central/rev/cdfaac3ff235
PS:
I rewrote 2
|if (receiver == nsnull) return NS_ERROR_OUT_OF_MEMORY;|
Comment 10•17 years ago
|
||
This change caused my builds with --enable-libxul and --enable-tests, to fail on Linux (Ubuntu), FreeBSD and OS X, with the same linker message about TestSegmentedBuffers() not begin a public symbol. I think it is probably the makefile changes which have moved this test (so it might now be compiling). The changes to the makefile also forgot to move TestPipes in CPP_UNIT_TESTS.
| Assignee | ||
Comment 11•17 years ago
|
||
(In reply to comment #10)
> This change caused my builds with --enable-libxul and --enable-tests,
Reproduced with '--enable-debug --enable-libxul' actually ('--enable-tests' being default)
{
TestPipes.obj : error LNK2019: unresolved external symbol "void __cdecl TestSegmentedBuffer(void)" (?TestSegmentedBuffer@@YAXXZ) referenced in function _main
TestPipes.exe : fatal error LNK1120: 1 unresolved externals
}
Fixed by
http://hg.mozilla.org/mozilla-central/rev/60bd0ee88c78
> The changes to the makefile also forgot to move TestPipes in CPP_UNIT_TESTS.
I'll move this part to bug 457046 too.
You need to log in
before you can comment on or make changes to this bug.
Description
•