зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1611565 - Cherry-pick upstream patch to use public siginfo_t fields r=gcp
Upstream patch:
6bd491daaf
%5E%21/#F0
_sifields is a glibc-internal field, and is not available on musl
libc. Instead, use the public-facing fields si_call_addr, si_syscall,
and si_arch, if they are available.
Differential Revision: https://phabricator.services.mozilla.com/D61051
--HG--
extra : moz-landing-system : lando
This commit is contained in:
Родитель
6b86d4786b
Коммит
4809dfc033
|
@ -164,11 +164,18 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) {
|
|||
}
|
||||
|
||||
|
||||
// Obtain the siginfo information that is specific to SIGSYS. Unfortunately,
|
||||
// most versions of glibc don't include this information in siginfo_t. So,
|
||||
// we need to explicitly copy it into a arch_sigsys structure.
|
||||
// Obtain the siginfo information that is specific to SIGSYS.
|
||||
struct arch_sigsys sigsys;
|
||||
#if defined(si_call_addr) && !defined(__native_client_nonsfi__)
|
||||
sigsys.ip = info->si_call_addr;
|
||||
sigsys.nr = info->si_syscall;
|
||||
sigsys.arch = info->si_arch;
|
||||
#else
|
||||
// If the version of glibc doesn't include this information in
|
||||
// siginfo_t (older than 2.17), we need to explicitly copy it
|
||||
// into an arch_sigsys structure.
|
||||
memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
|
||||
#endif
|
||||
|
||||
#if defined(__mips__)
|
||||
// When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the
|
||||
|
|
Загрузка…
Ссылка в новой задаче