PERFORCE change 169600 for review
Stanislav Sedov
stas at FreeBSD.org
Mon Oct 19 16:21:54 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=169600
Change 169600 by stas at stas_yandex on 2009/10/19 16:21:39
- Partially workaround signal source detection.
- Do not set SIGINFO flag on SIG_IGN and SIF_DFL.
Affected files ...
.. //depot/projects/valgrind/coregrind/m_signals.c#15 edit
Differences ...
==== //depot/projects/valgrind/coregrind/m_signals.c#15 (text+ko) ====
@@ -747,7 +747,8 @@
/* We don't set a signal stack, so ignore */
/* always ask for SA_SIGINFO */
- skss_flags |= VKI_SA_SIGINFO;
+ if (skss_handler != VKI_SIG_IGN && skss_handler != VKI_SIG_DFL)
+ skss_flags |= VKI_SA_SIGINFO;
#ifdef VGO_linux
/* use our own restorer */
@@ -1407,7 +1408,11 @@
// them.
return ( si_code > VKI_SI_USER ? True : False );
#elif defined(VGO_freebsd)
- return ( (si_code & VKI_SI_USER) == 0 ? True : False );
+ // It looks like there's no reliable way to say where the signal came from
+ if (VG_(threads)[tid].status == VgTs_WaitSys) {
+ return False;
+ } else
+ return True;
#elif defined(VGO_darwin)
// On Darwin 9.6.0, the si_code is completely unreliable. It should be the
// case that 0 means "user", and >0 means "kernel". But:
More information about the p4-projects
mailing list