From patchwork Mon Aug 3 17:55:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 503255 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6D70E1402D1 for ; Tue, 4 Aug 2015 03:55:12 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Q0Ja6/H7; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=vkzPtRos0rVNgGHLEY rTuWd49lHjhrqp/daRmuqgX7xO3maP6DW2UeJuHkJu0G83MwCbm2bZru3lZXordX zuFr548t6uBVemjNS6essKmLMghFp6CxzJ1xRrF1/tc5Dkwv+wefHmqCPpjKuP14 uXrIyLfECPvKupTnm1kAvVTm0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=5H9y+IjxjvLbzMIgU9tZR86v 3ik=; b=Q0Ja6/H7BM9bJ+DnF34dIXwVJ3YZCTaX1G+Of56dqBroO50EJ8MPJvR/ bWcEHdV65dJ97QlqSXO9qTgF4LdLfN1lRst9yXO1L2y10M/nxIaPkRJklN9IrbXP /QZfExZxLSLSjEGsYLUIRdjRrnq6+SIIfu+NhMUcJxbUD/nUBHE= Received: (qmail 57563 invoked by alias); 3 Aug 2015 17:55:06 -0000 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 Received: (qmail 57552 invoked by uid 89); 3 Aug 2015 17:55:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-io0-f175.google.com Received: from mail-io0-f175.google.com (HELO mail-io0-f175.google.com) (209.85.223.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 03 Aug 2015 17:55:03 +0000 Received: by ioeg141 with SMTP id g141so152676212ioe.3 for ; Mon, 03 Aug 2015 10:55:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=sfUi4kOoeFsDEcnfBAZDtAoRHEZwXGS5wTDdRd05OzY=; b=NmEK0VdDJGK4G6nQBn3C0AI4PuDyiaDkNBeO9TL6aYI+zCrI3m09A+W8GkgimaFnfm apExzBK5C0rDMmyDvitcjBZoG/bDEI5EbNCcK68lnU4gslzJIBMu1lQqLKM4zLOOsIIj I2hlYpYcOwpWlI3efdypLMLcSmiKXE+/ri/R6wiPUHHBbUG2yQ7cO0YzaUvb8Dn+M9EK w8K6GAuBidWctHx3XRfz6d/3IruPzWFS4lOPXJjGM/zbS65pMYnehDqVcIrWMqsO9XvY DdDbZPWs2dm4BUDbduyVJZ1WX4rVVQB5Lh+rUJdPyRBREhIuDk2ZL5Xs+OcT97YrzhsY DRXQ== X-Gm-Message-State: ALoCoQmvee8LhkDzP7FW51/IzHkE2qsv36u2EdOtDmWGN+ro9ikQNh6Pk0B2OTkDfO3i3AW1sXXU MIME-Version: 1.0 X-Received: by 10.107.132.215 with SMTP id o84mr22938125ioi.36.1438624501010; Mon, 03 Aug 2015 10:55:01 -0700 (PDT) Received: by 10.79.102.133 with HTTP; Mon, 3 Aug 2015 10:55:00 -0700 (PDT) In-Reply-To: References: Date: Mon, 3 Aug 2015 10:55:00 -0700 Message-ID: Subject: Re: Go patch committed: Fix error reporting for invalid builtin calls From: Ian Lance Taylor To: Andreas Schwab Cc: gcc-patches , "gofrontend-dev@googlegroups.com" On Mon, Aug 3, 2015 at 2:10 AM, Andreas Schwab wrote: > ../../../libgo/runtime/mprof.goc: In function 'runtime_Stack': > ../../../libgo/runtime/mprof.goc:408:5: error: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Werror=frame-address] > sp = runtime_getcallersp(&b); Fixed by this patch by Chris Manghane. The call was not actually necessary. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. This fixes PR 67101. Ian Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 226510) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -2bf7c643a1d2f8503070c8e6cb87852026e32400 +d5aad2f400a0f21724e33e4ae48e1583ed8b1a87 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/runtime/mprof.goc =================================================================== --- libgo/runtime/mprof.goc (revision 226510) +++ libgo/runtime/mprof.goc (working copy) @@ -402,10 +402,9 @@ func ThreadCreateProfile(p Slice) (n int } func Stack(b Slice, all bool) (n int) { - byte *pc, *sp; + byte *pc; bool enablegc; - sp = runtime_getcallersp(&b); pc = (byte*)(uintptr)runtime_getcallerpc(&b); if(all) { @@ -423,7 +422,6 @@ func Stack(b Slice, all bool) (n int) { g->writebuf = (byte*)b.__values; g->writenbuf = b.__count; USED(pc); - USED(sp); runtime_goroutineheader(g); runtime_traceback(); runtime_printcreatedby(g);