From owner-p4-projects@FreeBSD.ORG Mon Oct 19 16:21:54 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EEC7010656AB; Mon, 19 Oct 2009 16:21:53 +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 A6FAE1065692 for ; Mon, 19 Oct 2009 16:21:53 +0000 (UTC) (envelope-from stas@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 94A758FC12 for ; Mon, 19 Oct 2009 16:21:53 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n9JGLrvN080294 for ; Mon, 19 Oct 2009 16:21:53 GMT (envelope-from stas@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n9JGLrPH080292 for perforce@freebsd.org; Mon, 19 Oct 2009 16:21:53 GMT (envelope-from stas@freebsd.org) Date: Mon, 19 Oct 2009 16:21:53 GMT Message-Id: <200910191621.n9JGLrPH080292@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to stas@freebsd.org using -f From: Stanislav Sedov To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 169600 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2009 16:21:54 -0000 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: