Skip to content

Commit

Permalink
Bug 1154803 - Put our sigaction diversion in __sigaction if it exists…
Browse files Browse the repository at this point in the history
… r=glandium
  • Loading branch information
travis committed Apr 21, 2015
1 parent 6e361d8 commit e56b979
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mozglue/linker/ElfLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit e56b979

Please sign in to comment.