From patchwork Tue Aug 25 17:44:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 510578 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 73DF41401E7 for ; Wed, 26 Aug 2015 03:44:26 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=vgS7AcOE; 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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=hxqWxmU0Yccu2xU1agTI3TjEz1a9/2l5zaC0pbUuC4YTiuqe/O Ua5vhY6kMe9d8HJ5MB9xuiZswh937b5LNk7XDqT+6ZIaP+2V/T3aKS1dPu0e2ACX 12yUu6qN5Z0MEfMiLY+lgNh2yH+tB5sE1KJANatMgAtBJ8J/RRmrPxUY0= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=rMl4BKBS9/UdrP1Q+z3APGtwSVY=; b=vgS7AcOEo8I7d1BTRJ3b Wi4XvHrLHZIpyu/wFr3WFJaDpuZ1hHPW7w9sAG6/DMuPOVv4XxSDD79C3CoLM14P 4SiK7nb+0f+SJYPPyXmHehZdscs6XSwoUSH7i2U+5obGjObYMpfW6hnj74Bs3+yM LkGDxLGtvUnLqsyeSN6Zfcg= Received: (qmail 59948 invoked by alias); 25 Aug 2015 17:44:18 -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 59933 invoked by uid 89); 25 Aug 2015 17:44:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.1 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; Tue, 25 Aug 2015 17:44:17 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 6D4B08CF77 for ; Tue, 25 Aug 2015 17:44:16 +0000 (UTC) Received: from reynosa.quesejoda.com (vpn-53-23.rdu2.redhat.com [10.10.53.23]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7PHiFNZ023218; Tue, 25 Aug 2015 13:44:15 -0400 To: Jakub Jelinek , gcc-patches From: Aldy Hernandez Subject: [gomp-4.1] fix incorrect memory size in goacc_new_thread Message-ID: <55DCA96E.10805@redhat.com> Date: Tue, 25 Aug 2015 10:44:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 This is either blatantly wrong or subtly correct, in which case it needs a comment. My guess is the former. OK for branch? commit 330391636113ed9a9067e6eb639755fb0f4723dc Author: Aldy Hernandez Date: Tue Aug 25 10:41:28 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;