From patchwork Thu Aug 27 15:13:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 511327 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 A60611401DA for ; Fri, 28 Aug 2015 01:13:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=bVP08wIU; 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 :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=HLop+MnZYa4d6IrNQ sTS4o5KAJdwQkZ6AcYPIem1TriJ7B7rxDAmOHyA3yXFj7XDwtOlDyEIvj/ZbMLo/ 9a899fCDwyyy8kAX6JD/I5xRgjwdCspoJ5ZcdDz8siY/dH5vso8KrFNHH3o2GRZz 4k14CnB14vHLjmQlZzO+Xf/xkc= 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 :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=xVdSUjPwJKTgQysbnkFca1B hM00=; b=bVP08wIUjOCQIWH1uJgTfwRibysXw62V6lkeP+ejPIsiKCThJHJxbIM Uqjej7dd1AOBXqIH/ffOEYeSKkfDO9TwgT08vjcZZI7rC2IDUEX3y4zD7Zceave7 QejqkH7EFmxh+oBNAYQdnYmfXP3tHiQrZ/+1pBqvqZNHT1Z6AukQ= Received: (qmail 77687 invoked by alias); 27 Aug 2015 15:13:13 -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 77574 invoked by uid 89); 27 Aug 2015 15:13:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.2 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 27 Aug 2015 15:13:07 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id D4DD3A2C29; Thu, 27 Aug 2015 15:13:05 +0000 (UTC) Received: from reynosa.quesejoda.com (vpn-55-128.rdu2.redhat.com [10.10.55.128]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7RFD4aX030914; Thu, 27 Aug 2015 11:13:04 -0400 Subject: Re: [gomp-4.1] fix incorrect memory size in goacc_new_thread To: Jakub Jelinek , gcc-patches , thomas@schwinge.name References: <55DCA96E.10805@redhat.com> From: Aldy Hernandez Message-ID: <55DF2900.8020705@redhat.com> Date: Thu, 27 Aug 2015 08:13:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55DCA96E.10805@redhat.com> On 08/25/2015 10:44 AM, Aldy Hernandez wrote: > This is either blatantly wrong or subtly correct, in which case it needs > a comment. My guess is the former. > > OK for branch? Hi Thomas. Jakub has pre-approved this patch. I would like to commit it to trunk. Do you object? Would you like to test it further? Thanks. commit badfb67c72f72e468c1e100711fa5e925a831ed6 Author: Aldy Hernandez Date: Tue Aug 25 10:32:48 2015 -0700 * oacc-init.c (goacc_new_thread): Use correct size of goacc_thread when allocating memory. diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c index c91731e..e6d2c03 100644 --- a/libgomp/oacc-init.c +++ b/libgomp/oacc-init.c @@ -312,7 +312,7 @@ acc_shutdown_1 (acc_device_t d) static struct goacc_thread * goacc_new_thread (void) { - struct goacc_thread *thr = gomp_malloc (sizeof (struct gomp_thread)); + struct goacc_thread *thr = gomp_malloc (sizeof (struct goacc_thread)); #if defined HAVE_TLS || defined USE_EMUTLS goacc_tls_data = thr;