Closed Bug 1131658 Opened 10 years ago Closed 10 years ago

In bluetoothd, check malloc failures by return value instead of errno

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.2+, b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S6 (20feb)
blocking-b2g 2.2+
Tracking Status
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: tzimmermann, Assigned: tzimmermann)

References

Details

Attachments

(2 files)

In bug 1131619, we found a case were malloc error checks by errno actually didn't work. It's probably safer to convert bluetoothd to use the common scheme of testing malloc errors by return value.
Assignee: nobody → tzimmermann
Status: NEW → ASSIGNED
Attachment #8565054 - Flags: review?(shuang)
Summary: In bluetoothd, check malloc failures be return value instead of errno → In bluetoothd, check malloc failures by return value instead of errno
Attachment #8565056 - Flags: review?(shuang)
Comment on attachment 8565054 [details] Github pull request for bluetoothd r=me, set_wake_alarm_cb part probably need to be re-based.
Attachment #8565054 - Flags: review?(shuang) → review+
Let's block for this bug.
Depends on: 1130271
If v2.2 will be supported on the Z3, we should back-port this fix. Otherwise it's probably not important.
blocking-b2g: --- → 2.2?
Patch includes prevention of false positives and null checks. I think it's a good idea to take these patches.
blocking-b2g: 2.2? → 2.2+
Comment on attachment 8565054 [details] Github pull request for bluetoothd Updated Github pull request: - rebased onto bug 1130271
Comment on attachment 8565056 [details] Github pull request for libfdio Updated Github pull request: - rebased onto bug 1130271
Comment on attachment 8565054 [details] Github pull request for bluetoothd NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): Bluetooth daemon on Sony Z3 User impact if declined: There were problems with memory allocations on Z3. Users might see invalid out-of-memory errors on this device. Testing completed: Local builds and testing Risk to taking this patch (and alternatives if risky): Low. The patches implement a standard C pattern. String or UUID changes made by this patch: None
Attachment #8565054 - Flags: approval-mozilla-b2g37?
Comment on attachment 8565056 [details] Github pull request for libfdio NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Please see comment #9
Attachment #8565056 - Flags: approval-mozilla-b2g37?
Attachment #8565054 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Attachment #8565056 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: