From patchwork Sat Feb 2 15:11:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 217672 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 34AF62C0084 for ; Sun, 3 Feb 2013 02:12:05 +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=1360422726; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: From:To:Subject:Date: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=wi8vWok KyT4hIPNKTNfWK9Q+xfQ=; b=FI0KG3biYLXrn/w810Sc7pHcBh8n5gZA1dNluEM LEGznOKQTVT2rrLlif8PHWceoMvQWhzLfVNJhRxbp7zoYiA+29P+gX78PMaYBRDz z/RNWmb6nwJPSOKYw1Tk9oxT9DnZMHplnt7o9uJs06UqAM2fZuAt0kgs7NEJgEvI xEH0= 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-Google-DKIM-Signature:X-Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=PiYkDuiXJmhqnbjS1+WPVQiK1p7qE3OvUtICZCauIzhqcRVXLG9oPSN22KkSgE P82epLw9G1tmOw7QVgW18Bf0UJ8r2C2LhTfpwtMMZSdxcBl53NR7MHQQSO3Yct0d FdPxQZ1HpYrqrE6h9HtJwbdcQq8kDAmJsYkwJUNp+9Usg=; Received: (qmail 6846 invoked by alias); 2 Feb 2013 15:12:01 -0000 Received: (qmail 6819 invoked by uid 22791); 2 Feb 2013 15:12:00 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-pb0-f53.google.com (HELO mail-pb0-f53.google.com) (209.85.160.53) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 02 Feb 2013 15:11:56 +0000 Received: by mail-pb0-f53.google.com with SMTP id un1so2554698pbc.12 for ; Sat, 02 Feb 2013 07:11:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:subject:date:message-id:user-agent:mime-version :content-type:x-gm-message-state; bh=e8BQztCbRW9bmIiHlWif3nPiUWf4SGbrA2ukWqnecgU=; b=E3wNbL9pmXh/WyENRQpVueIWXa/9H18N8u/JhAz2AbH8zIIx3mb4wbvOZXWs4XUKOi vJyTF8jjC3EZnYu1jOmbXRVmJ6CiaQv9sCnHI5zOFduV9pf1Tf2pGskwS/sWkBjnUX0Y RjHZsnf2i15cvgDDoq2clUbsTd+Q7M64TsTyAIyTrHq3HqONWLeAJgcWwOev56z65tIo qeNzix/EcIUEuMNcGvuG2eLI7Unay4HVSl9fbU92suZ1fx9gn8rxOXHH/8wS8qw9H6MI XeRns1IJ8ZsT+NOkQalM96f699ffK9/HdTX/yVPzjMMLPXe+u130u7ixbB/OBjozdqKN gnyA== X-Received: by 10.68.237.135 with SMTP id vc7mr41448806pbc.2.1359817915570; Sat, 02 Feb 2013 07:11:55 -0800 (PST) Received: from iant-glaptop.google.com ([172.19.252.162]) by mx.google.com with ESMTPS id o5sm12799884pay.5.2013.02.02.07.11.53 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 02 Feb 2013 07:11:54 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: libgo patch committed: Correct runtime.Callers skip argument Date: Sat, 02 Feb 2013 07:11:52 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQljSIi1uSGcTjDhJ0+40zIdy36+qqADz5lX8LawwcwCLSTbuDs4X88PxbiSti0SO/y5HGPKmxE65XmD0a4A6tv78hdnN/6WjG2hMDG6u6v80WlOa7tGUw+AQNjiCxMPlmGfgMntQddyLDe/7D1R73cg53mRK6v/91aI/kfyz1wkDeWYjqOeGFmcBCilzBSGiElX+6yG X-IsSubscribed: yes 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 With the change to using the libbacktrace code, inlined functions now picked up. Previously the skip parameter to runtime.Callers was adjusted based on inlining that was ignored. This patch corrects it so that the right thing happens. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 13363f80cdf6 libgo/runtime/go-callers.c --- a/libgo/runtime/go-callers.c Thu Jan 31 21:48:23 2013 -0800 +++ b/libgo/runtime/go-callers.c Sat Feb 02 07:09:40 2013 -0800 @@ -115,8 +115,9 @@ /* In the Go 1 release runtime.Callers has an off-by-one error, which we can not correct because it would break backward - compatibility. Adjust SKIP here to be compatible. */ - ret = runtime_callers (skip - 1, locbuf, pc.__count); + compatibility. Normally we would add 1 to SKIP here, but we + don't so that we are compatible. */ + ret = runtime_callers (skip, locbuf, pc.__count); for (i = 0; i < ret; i++) ((uintptr *) pc.__values)[i] = locbuf[i].pc;