From owner-p4-projects@FreeBSD.ORG Fri Nov 7 20:22:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D50941065672; Fri, 7 Nov 2008 20:22:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99472106564A for ; Fri, 7 Nov 2008 20:22:33 +0000 (UTC) (envelope-from peter-gmail@wemm.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 87A138FC0A for ; Fri, 7 Nov 2008 20:22:33 +0000 (UTC) (envelope-from peter-gmail@wemm.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mA7KMXrF031323 for ; Fri, 7 Nov 2008 20:22:33 GMT (envelope-from peter-gmail@wemm.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mA7KMXjF031321 for perforce@freebsd.org; Fri, 7 Nov 2008 20:22:33 GMT (envelope-from peter-gmail@wemm.org) Date: Fri, 7 Nov 2008 20:22:33 GMT Message-Id: <200811072022.mA7KMXjF031321@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter-gmail@wemm.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 152632 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Nov 2008 20:22:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=152632 Change 152632 by peter@peter_overcee on 2008/11/07 20:22:26 Treat SIGSYS as a synchronous signal, like SIGBUS and SIGSEGV. Otherwise it gets queued up and turns up later at misleading times when it gets unmaked for an async syscall. Affected files ... .. //depot/projects/valgrind/coregrind/m_libcsignal.c#8 edit .. //depot/projects/valgrind/coregrind/m_main.c#10 edit .. //depot/projects/valgrind/coregrind/m_scheduler/scheduler.c#3 edit .. //depot/projects/valgrind/coregrind/m_signals.c#9 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_libcsignal.c#8 (text+ko) ==== @@ -261,6 +261,7 @@ vg_assert(sig != VKI_SIGSEGV); vg_assert(sig != VKI_SIGBUS); vg_assert(sig != VKI_SIGTRAP); + vg_assert(sig != VKI_SIGSYS); /* do nothing */ } ==== //depot/projects/valgrind/coregrind/m_main.c#10 (text+ko) ==== @@ -2284,6 +2284,7 @@ VG_(set_default_handler)(VKI_SIGBUS); VG_(set_default_handler)(VKI_SIGILL); VG_(set_default_handler)(VKI_SIGFPE); + VG_(set_default_handler)(VKI_SIGSYS); // We were exiting, so assert that... vg_assert(VG_(is_exiting)(tid)); ==== //depot/projects/valgrind/coregrind/m_scheduler/scheduler.c#3 (text+ko) ==== @@ -344,6 +344,7 @@ VG_(sigdelset)(&mask, VKI_SIGFPE); VG_(sigdelset)(&mask, VKI_SIGILL); VG_(sigdelset)(&mask, VKI_SIGTRAP); + VG_(sigdelset)(&mask, VKI_SIGSYS); /* Can't block these anyway */ VG_(sigdelset)(&mask, VKI_SIGSTOP); ==== //depot/projects/valgrind/coregrind/m_signals.c#9 (text+ko) ==== @@ -487,6 +487,7 @@ case VKI_SIGFPE: case VKI_SIGILL: case VKI_SIGTRAP: + case VKI_SIGSYS: /* For these, we always want to catch them and report, even if the client code doesn't. */ skss_handler = sync_signalhandler; @@ -1192,6 +1193,7 @@ case VKI_SIGTRAP: /* core */ case VKI_SIGXCPU: /* core */ case VKI_SIGXFSZ: /* core */ + case VKI_SIGSYS: /* core */ terminate = True; core = True; break; @@ -1208,7 +1210,6 @@ #ifdef VKI_SIGPWR case VKI_SIGPWR: /* term */ #endif - case VKI_SIGSYS: /* term */ case VKI_SIGPROF: /* term */ case VKI_SIGVTALRM: /* term */ case VKI_SIGRTMIN ... VKI_SIGRTMAX: /* term */ @@ -1763,7 +1764,8 @@ sigNo == VKI_SIGBUS || sigNo == VKI_SIGFPE || sigNo == VKI_SIGILL || - sigNo == VKI_SIGTRAP); + sigNo == VKI_SIGTRAP || + sigNo == VKI_SIGSYS); #if 0 VG_(printf)("signal %d\n", sigNo); VG_(printf)("si_signo %d\n", info->si_signo);