Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Nov 2008 20:22:33 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 152632 for review
Message-ID:  <200811072022.mA7KMXjF031321@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811072022.mA7KMXjF031321>