Date: Mon, 19 Oct 2009 16:21:53 GMT From: Stanislav Sedov <stas@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 169600 for review Message-ID: <200910191621.n9JGLrPH080292@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=169600 Change 169600 by stas@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910191621.n9JGLrPH080292>