summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-10-05 21:39:07 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-10-05 21:39:07 +0000
commit7195bed2f5425f20bf7a4cd34dbf86559e17a05e (patch)
treec07e66772af73814bc376b804dfe6d15ddd7cc82 /usr.bin
parente2e358d7ecdf3ba980d39f9bc1cc12aaf70a5d78 (diff)
downloadFreeBSD-src-7195bed2f5425f20bf7a4cd34dbf86559e17a05e.zip
FreeBSD-src-7195bed2f5425f20bf7a4cd34dbf86559e17a05e.tar.gz
Fix crash if a process sends itself a SIGTRAP. Just forward it as expected.
MFC after: 2 weeks [needs rewrite] Relnotes: yes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/truss/setup.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/truss/setup.c b/usr.bin/truss/setup.c
index 74008e4..74678e6 100644
--- a/usr.bin/truss/setup.c
+++ b/usr.bin/truss/setup.c
@@ -564,15 +564,12 @@ eventloop(struct trussinfo *info)
}
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)
enter_syscall(info, &pl);
else if (pl.pl_flags & PL_FLAG_SCX)
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;
} else if (pl.pl_flags & PL_FLAG_CHILD) {
if ((info->flags & COUNTONLY) == 0)
OpenPOWER on IntegriCloud