Fix crash if a process sends itself a SIGTRAP. Just forward it as expected.
MFC after: 2 weeks [needs rewrite] Relnotes: yes
This commit is contained in:
parent
3edd0ffffe
commit
94746562ff
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288903
@ -564,15 +564,12 @@ eventloop(struct trussinfo *info)
|
|||||||
}
|
}
|
||||||
find_thread(info, si.si_pid, pl.pl_lwpid);
|
find_thread(info, si.si_pid, pl.pl_lwpid);
|
||||||
|
|
||||||
if (si.si_status == SIGTRAP) {
|
if (si.si_status == SIGTRAP &&
|
||||||
|
(pl.pl_flags & (PL_FLAG_SCE|PL_FLAG_SCX)) != 0) {
|
||||||
if (pl.pl_flags & PL_FLAG_SCE)
|
if (pl.pl_flags & PL_FLAG_SCE)
|
||||||
enter_syscall(info, &pl);
|
enter_syscall(info, &pl);
|
||||||
else if (pl.pl_flags & PL_FLAG_SCX)
|
else if (pl.pl_flags & PL_FLAG_SCX)
|
||||||
exit_syscall(info, &pl);
|
exit_syscall(info, &pl);
|
||||||
else
|
|
||||||
errx(1,
|
|
||||||
"pl_flags %x contains neither PL_FLAG_SCE nor PL_FLAG_SCX",
|
|
||||||
pl.pl_flags);
|
|
||||||
pending_signal = 0;
|
pending_signal = 0;
|
||||||
} else if (pl.pl_flags & PL_FLAG_CHILD) {
|
} else if (pl.pl_flags & PL_FLAG_CHILD) {
|
||||||
if ((info->flags & COUNTONLY) == 0)
|
if ((info->flags & COUNTONLY) == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user