Closed Bug 1123628 Opened 7 years ago Closed 6 years ago

mozilla::hal_impl::PriorityClass::~PriorityClass() closes not-open files

Categories

(Core Graveyard :: Widget: Gonk, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: jseward, Assigned: jseward)

Details

Attachments

(2 files, 1 obsolete file)

Attached file Valgrind complaints
During FxOS startup on Nexus5, I see PriorityClass::~PriorityClass
closing mMemCGroupProcsFd when it is not open (the fd == -1).
Probably harmless (unless it denotes a failure to have opened said
file in the first place), Valgrind complains about it.  I would
prefer this get fixed cleanly so as to avoid the warning.  I see it
reported 9 times during startup.
Attached patch a possible fix (obsolete) — Splinter Review
This checks both mCpuCGroupProcsFd and mMemCGroupProcsFd before
closing them.  I think it is only the latter that was a problem, but
looking at the structure of the code, both fds are handled in the same
way so it seems prudent to check both.
Rebased.
Attachment #8551735 - Attachment is obsolete: true
Attachment #8560471 - Flags: review?(dhylands)
Comment on attachment 8560471 [details] [diff] [review]
bug1123628-2.diff

Review of attachment 8560471 [details] [diff] [review]:
-----------------------------------------------------------------

Looks reasonable to me. Thanks
Attachment #8560471 - Flags: review?(dhylands) → review+
https://hg.mozilla.org/mozilla-central/rev/0391a0d60063
Assignee: nobody → jseward
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.