[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    valgrind
From:       Jeremy Fitzhardinge <jeremy () goop ! org>
Date:       2005-01-24 8:13:17
Message-ID: 20050124081317.46E5C1D027 () office ! kde ! org
[Download RAW message or body]

CVS commit by fitzhardinge: 

Mop up any stray SIGVGCHLDs in poll_signals(); they are generated by
thread exit events, but mostly we don't care about them.  However, if
we let too many accumulate, they prevent the proper delivery of other
RT signals which are important, like stack-growth SIGSEGVs.


  A            none/tests/thread-exits.c   1.1 [no copyright]
  A            none/tests/thread-exits.stderr.exp   1.1
  A            none/tests/thread-exits.stdout.exp   1.1
  A            none/tests/thread-exits.vgtest   1.1
  M +7 -0      coregrind/vg_signals.c   1.114
  M +4 -0      none/tests/Makefile.am   1.60


--- valgrind/coregrind/vg_signals.c  #1.113:1.114
@@ -1865,4 +1865,11 @@ void VG_(poll_signals)(ThreadId tid)
    vki_sigset_t saved_mask;
 
+   /* First, mop up any pending SIGVGCHLDs; we don't care about
+      them here. */
+   VG_(sigemptyset)(&pollset);
+   VG_(sigaddset)(&pollset, VKI_SIGVGCHLD);
+   while(VG_(sigtimedwait)(&pollset, NULL, &zero) == VKI_SIGVGCHLD)
+      ;
+
    /* look for all the signals this thread isn't blocking */
    for(i = 0; i < _VKI_NSIG_WORDS; i++)

--- valgrind/none/tests/Makefile.am  #1.59:1.60
@@ -59,4 +59,5 @@
         syscall-restart2.vgtest syscall-restart2.stdout.exp syscall-restart2.stderr.exp \
         system.stderr.exp system.vgtest \
+        thread-exits.stderr.exp thread-exits.stdout.exp thread-exits.vgtest \
         tls.stderr.exp tls.stdout.exp  \
         yield.stderr.exp yield.stdout.exp yield.vgtest
@@ -72,4 +73,5 @@
         smc1 susphello pending pth_blockedsig pth_stackalign \
         syscall-restart1 syscall-restart2 system \
+        thread-exits \
         tls tls.so tls2.so \
         coolo_sigaction gxx304 yield
@@ -122,4 +124,6 @@
 syscall_restart2_SOURCES = syscall-restart2.c
 system_SOURCES          = system.c
+thread_exits_SOURCES    = thread-exits.c
+thread_exits_LDADD      = -lpthread
 tls_SOURCES             = tls.c tls2.c
 tls_DEPENDENCIES        = tls.so


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic