Bug 1154803 - Put our sigaction diversion in __sigaction if it exists r=glandium

This commit is contained in:
travis 2015-04-20 17:15:32 -05:00
parent e7c017a55f
commit 0df4f10497

View File

@ -1116,8 +1116,17 @@ SEGVHandler::FinishInitialization()
*/
void *libc = dlopen("libc.so", RTLD_GLOBAL | RTLD_LAZY);
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
#endif
{