Closed
Bug 1183781
Opened 9 years ago
Closed 7 years ago
Small leak in DNS.cpp and nsHostResolver.cpp
Categories
(Core :: Networking: DNS, defect, P2)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: valentin, Assigned: valentin)
References
Details
(Whiteboard: [necko-next])
Attachments
(3 files)
7.40 KB,
text/plain
|
Details | |
2.21 KB,
patch
|
sworkman
:
review+
|
Details | Diff | Splinter Review |
10.23 KB,
patch
|
sworkman
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8634059 -
Flags: review?(sworkman)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → valentin.gosu
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
ASAN proving the leak is gone: https://treeherder.mozilla.org/#/jobs?repo=try&revision=eb7317f560a8 Unit tests on win/mac: https://treeherder.mozilla.org/#/jobs?repo=try&revision=fe81e01323bb
Comment 3•9 years ago
|
||
Comment on attachment 8634059 [details] [diff] [review] i - Fix leak in nsHostResolver Review of attachment 8634059 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, thanks Valentin. r=me with some nits. Per our IRC chat, please file a new bug to convert these raw pointers to nsAutoPtr or something like that. ::: netwerk/dns/nsHostResolver.cpp @@ +863,5 @@ > LOG_HOST(host, netInterface), > (af == PR_AF_INET) ? "AF_INET" : "AF_INET6")); > > + if (he->rec->addr_info) { > + // prevent leak Put the comment before the if block and change to... // Ensure existing |addr_info| in |he| is cleared before copying from |unSpecHe|. @@ +870,1 @@ > he->rec->addr_info = nullptr; Please put the "= nullptr" in the if block.
Attachment #8634059 -
Flags: review?(sworkman) → review+
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/60d045b1c1a6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Comment 6•9 years ago
|
||
Backed out at KaiRo's request for causing bug 1186435. https://hg.mozilla.org/mozilla-central/rev/2ddec2dedced
Status: RESOLVED → REOPENED
status-firefox42:
fixed → ---
Resolution: FIXED → ---
Target Milestone: mozilla42 → ---
Assignee | ||
Comment 7•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=36451e86c4d5
Assignee | ||
Comment 8•9 years ago
|
||
* makes AddrInfo extend nsISupports * uses RefPtr for managing AddrInfo and nsHostResolver in nsHostResolver.cpp
Attachment #8689496 -
Flags: review?(sworkman)
Comment 9•9 years ago
|
||
Comment on attachment 8689496 [details] [diff] [review] Small leak in DNS.cpp and nsHostResolver.cpp Review of attachment 8689496 [details] [diff] [review]: ----------------------------------------------------------------- LGTM - couple of really minor style nits. r=me. ::: netwerk/dns/GetAddrInfo.cpp @@ +362,5 @@ > } > > bool filterNameCollision = !(aFlags & nsHostResolver::RES_ALLOW_NAME_COLLISION); > + RefPtr<AddrInfo> ai(new AddrInfo(aCanonHost, prai, disableIPv4, > + filterNameCollision, canonName)); nit: filterNameCollision should align with aCanonHost on the line above since they're both in the list of params in AddrInfo's constructor. ::: netwerk/dns/nsHostResolver.cpp @@ +1244,5 @@ > > rec->negative = !rec->addr_info; > PrepareRecordExpiration(rec); > rec->resolving = false; > nit: Can you remove this whitespace while you're updating the code please?
Attachment #8689496 -
Flags: review?(sworkman) → review+
Assignee | ||
Comment 10•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b9b6a1567ef6b27735e19b661e895753db58e902 Bug 1183781 - Small leak in DNS.cpp and nsHostResolver.cpp r=sworkman
Comment 11•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b9b6a1567ef6
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Assignee | ||
Comment 13•8 years ago
|
||
The leak still exists since we backed out the patch fixing this about 3 times already. I'm currently investigating it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [necko-active]
Updated•8 years ago
|
status-firefox45:
fixed → ---
Target Milestone: mozilla45 → ---
Assignee | ||
Updated•8 years ago
|
Whiteboard: [necko-active] → [necko-next]
Comment 14•7 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P2
Assignee | ||
Comment 15•7 years ago
|
||
The leak was fixed a while ago, and it is no longer triggered in automation. I'll open a new bug for converting the pointers to smart pointers.
Status: REOPENED → RESOLVED
Closed: 9 years ago → 7 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•