From patchwork Sun Oct 7 14:05:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 189839 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 5C0502C00C2 for ; Mon, 8 Oct 2012 01:05:34 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1350223535; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Cc:Subject:References:Date:In-Reply-To: Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=qRkcU7qCtFGTl9zeFBudVbWdlTk=; b=TEw4BFY+8x1vVgO65bxJw3Uxou0vSgw35xtUrPmS3xFLuD8cwGyVzkl6ro2S8s rHel1kxCNGF1r4Bu9u84aPDKyHLTNebJbMaN/XLifYDoYHNwsJG2I4oWsx0R4/J2 DY3q3qSRwu4DmYM3LLfMRCYskgHQZamJUqh2FDKGUvbrY= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Auth-Info:Received:Received:From:To:Cc:Subject:References:X-Yow:Date:In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Xdug0BX+r+/Y/RdC76uXK17do6+G6DviaAT8nRw4GfTwhyKr8rQIDMiZyYZTXW MsrgkVC7EqbRIZFVri8+ugiLe7yl+srm9C/hTqyI8TA9kjlAT3xq7uiAumGM85bb kR5963Xv6piM8tFrTYb9s343XMnrkv2134tjcGKNRn+3o=; Received: (qmail 22611 invoked by alias); 7 Oct 2012 14:05:30 -0000 Received: (qmail 22600 invoked by uid 22791); 7 Oct 2012 14:05:29 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 07 Oct 2012 14:05:21 +0000 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3XZRL76nBmz4KK4B; Sun, 7 Oct 2012 16:05:19 +0200 (CEST) X-Auth-Info: VyDEdwRnasOGFwiUnnjiV2BURSIZB55DS/r3TCzY/qs= Received: from igel.home (ppp-93-104-139-74.dynamic.mnet-online.de [93.104.139.74]) by mail.mnet-online.de (Postfix) with ESMTPA id 3XZRL762qwzbbbr; Sun, 7 Oct 2012 16:05:19 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 5504ECA2A4; Sun, 7 Oct 2012 16:05:19 +0200 (CEST) From: Andreas Schwab To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: Re: libgo patch committed: Use libbacktrace References: X-Yow: Here we are in America... when do we collect unemployment? Date: Sun, 07 Oct 2012 16:05:19 +0200 In-Reply-To: (Ian Lance Taylor's message of "Fri, 28 Sep 2012 07:48:35 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Ian Lance Taylor writes: > +/* Set *VAL to the value of the symbol for PC. */ > + > +static _Bool > +__go_symbol_value (uintptr_t pc, uintptr_t *val) > +{ > + *val = 0; > + backtrace_syminfo (__go_get_backtrace_state (), pc, syminfo_callback, > + error_callback, &val); > + return *val != 0; > } Don't clobber address of val. Andreas. diff --git a/libgo/runtime/go-caller.c b/libgo/runtime/go-caller.c index 843adf6..8dcf9e4 100644 --- a/libgo/runtime/go-caller.c +++ b/libgo/runtime/go-caller.c @@ -144,7 +144,7 @@ __go_symbol_value (uintptr_t pc, uintptr_t *val) { *val = 0; backtrace_syminfo (__go_get_backtrace_state (), pc, syminfo_callback, - error_callback, &val); + error_callback, val); return *val != 0; }