[New-bugs-announce] [issue46872] Odd handling of signal raised if an illegal syscall is attempted on Android
Dan Snider
report at bugs.python.org
Sun Feb 27 06:26:00 EST 2022
New submission from Dan Snider <mr.assume.away at gmail.com>:
On Android, the following calls generate a SIGSYS signal that is neither blocked by pthread_sigmask(SIG_BLOCK, {SIGSYS}) nor ignored after its handler is set to SIG_IGN:
(os.chroot(path))
os.setgid(rgid)
os.setuid(ruid)
(os.setegid(gid))
os.setregid(rgid, egid)
os.setreuid(ruid, euid)
os.setresgid(rgid, egid, sgid)
time.clock_settime(clock, time)
time.clock_settime_ns(clock, time)
(socket.sethostname(name))
On the other hand, signal(SIGSYS, lambda s, p: None) will catch the signal, but based on frame it receives (None), I suspect this is a coincidence. Also, the functions with parenthesized names in that list raise the equivalent of OSError(0, "Error", "%s"%args[0]).
----------
components: C API
messages: 414148
nosy: bup
priority: normal
severity: normal
status: open
title: Odd handling of signal raised if an illegal syscall is attempted on Android
type: behavior
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46872>
_______________________________________
More information about the New-bugs-announce
mailing list