Closed
Bug 1064529
Opened 10 years ago
Closed 10 years ago
Avoid use of invalid ipc::FileDescriptor in memory report requests
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: jld, Assigned: jld)
References
Details
Attachments
(1 file, 1 obsolete file)
8.82 KB,
patch
|
jld
:
review+
|
Details | Diff | Splinter Review |
PMemoryReportRequest (bug 946407) has been using the "invalid" case of ipc::FileDescriptor as a kind of in-band null value, sending an invalid DMD log file to indicate that DMD shouldn't be run. Judging by bug 831307, this is wrong, and an IPDL union should be used instead.
Assignee | ||
Comment 1•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=33af1e00e3f1 (and tested locally with a DMD build to verify that e10s-enabled DMD logging still works).
Attachment #8486084 -
Flags: review?(bent.mozilla)
Assignee | ||
Comment 2•10 years ago
|
||
Comment on attachment 8486084 [details] [diff] [review] bug1064529-dmd-maybe-hg0.diff Changing reviewer; the actual change here is to the memory reporter, and the question of ipc::FileDescriptor misuse is basically covered by noting the disappearance of the warning messages from the debug test logs.
Attachment #8486084 -
Flags: review?(bent.mozilla) → review?(n.nethercote)
Comment 3•10 years ago
|
||
Comment on attachment 8486084 [details] [diff] [review] bug1064529-dmd-maybe-hg0.diff Review of attachment 8486084 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/ipc/ContentChild.cpp @@ +219,5 @@ > { > MOZ_COUNT_CTOR(MemoryReportRequestChild); > + if (aDMDFile.type() == MaybeFileDesc::TFileDescriptor) { > + mDMDFile = aDMDFile.get_FileDescriptor(); > + } I don't understand this bit. Where does TFileDescriptor come from -- is it generated? And is it safe to call type() on |aDMDFile| if it might be |void_t|? I feel like MaybeFileDesc needs a tag value that tells you which arm of the union is in use, but I might be missing something. Also, it's not obvious what happens with |mDMDFile| when this test fails. Maybe it's default-constructed to some null-like value? Some kind of explicit initialization would make things clearer.
Comment 4•10 years ago
|
||
Comment on attachment 8486084 [details] [diff] [review] bug1064529-dmd-maybe-hg0.diff Review of attachment 8486084 [details] [diff] [review]: ----------------------------------------------------------------- Ok, now that I understand IPDL unions this looks ok. Thanks.
Attachment #8486084 -
Flags: review?(n.nethercote) → review+
Assignee | ||
Comment 5•10 years ago
|
||
Rebase; carrying over r+. https://tbpl.mozilla.org/?tree=Try&rev=15730d9d093f https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=15730d9d093f
Attachment #8486084 -
Attachment is obsolete: true
Attachment #8491944 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 6•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6579d448a271
Keywords: checkin-needed
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6579d448a271
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in
before you can comment on or make changes to this bug.
Description
•