From cd735d8f5a7c1f56d99f9d5e6535696d1e8484c3 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 16 Oct 2017 20:15:19 +0000 Subject: [PATCH] Improve assertion that an ignored or blocked signal is not delivered. Split two conditions into separate asserts. Print additional details, like the signal number and action value. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/kern_sig.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index d3bccd0dd1c..e0bc937b6e8 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -3030,8 +3030,10 @@ postsig(int sig) /* * If we get here, the signal must be caught. */ - KASSERT(action != SIG_IGN && !SIGISMEMBER(td->td_sigmask, sig), - ("postsig action")); + KASSERT(action != SIG_IGN, ("postsig action %p", action)); + KASSERT(!SIGISMEMBER(td->td_sigmask, sig), + ("postsig action: blocked sig %d", sig)); + /* * Set the new mask value and also defer further * occurrences of this signal.