Closed
Bug 741272
Opened 14 years ago
Closed 13 years ago
Implement a wrapper around raise() for Android and Gonk
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: cyu, Assigned: cyu)
Details
Attachments
(1 file)
|
3.21 KB,
patch
|
blassey
:
review+
khuey
:
review+
|
Details | Diff | Splinter Review |
Due to the bug in bionic libc's implementation of raise(), we will need a wrapper around it. Bug 730229 shows a typical symptom of the bug: when one thread hits an assertion, a random thread receives SIGABRT instead of the thread that calls raise(). The implementation in android 4.0 at the time being is even worse, which mixes gettid() and kill() and could in theory kill another process.
As POSIX specifies that raise(signo) is equivalent to pthread_kill(pthread_self(), signo), I would suggest implementing the wrapper in this way if there's no other concern. It should work correctly under bionic's pthread implementation.
| Assignee | ||
Comment 1•13 years ago
|
||
Implement raise() using pthread_kill() so the signal will be sent to the the
caller thread instead of a random thread in the thread group due to the bug in bionic libc.
Attachment #611708 -
Flags: review?(khuey)
Attachment #611708 -
Flags: review?(blassey.bugs)
Attachment #611708 -
Flags: review?(khuey) → review+
Comment 2•13 years ago
|
||
Why don't you fix bionic in gonk instead? That would fix it for more than just gecko.
| Assignee | ||
Comment 3•13 years ago
|
||
Per discussion with Michael Wu, the fix will be needed for both gonk and android. Firefox for android will need the fix for some time.
I also sent a patch to bionic, but we don't know how long we need to wait before the fix will be available. And there is no guarantee the fix will be backported to previous releases of Android.
Given the above reasons, it's suggested that we wrap the call in gecko.
This is the discussion thread for your reference: https://github.com/mozilla-b2g/platform_bionic/pull/2
Updated•13 years ago
|
Attachment #611708 -
Flags: review?(blassey.bugs) → review+
| Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 4•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/dde6ab4aa2c3
I have no idea what Target Milestone to use for B2G...
Keywords: checkin-needed
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•