Bug 1154803 - Put our sigaction diversion in __sigaction if it exists. r=glandium, a=sledru
This commit is contained in:
@@ -1112,8 +1112,17 @@ SEGVHandler::FinishInitialization()
|
|||||||
*/
|
*/
|
||||||
void *libc = dlopen("libc.so", RTLD_GLOBAL | RTLD_LAZY);
|
void *libc = dlopen("libc.so", RTLD_GLOBAL | RTLD_LAZY);
|
||||||
if (libc) {
|
if (libc) {
|
||||||
libc_sigaction =
|
/*
|
||||||
reinterpret_cast<sigaction_func>(dlsym(libc, "sigaction"));
|
* Lollipop bionic only has a small trampoline in sigaction, with the real
|
||||||
|
* work happening in __sigaction. Divert there instead of sigaction if it exists.
|
||||||
|
* Bug 1154803
|
||||||
|
*/
|
||||||
|
libc_sigaction = reinterpret_cast<sigaction_func>(dlsym(libc, "__sigaction"));
|
||||||
|
|
||||||
|
if (!libc_sigaction) {
|
||||||
|
libc_sigaction =
|
||||||
|
reinterpret_cast<sigaction_func>(dlsym(libc, "sigaction"));
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user