From patchwork Wed Jan 20 14:47:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Verbin X-Patchwork-Id: 570737 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 53353140317 for ; Thu, 21 Jan 2016 01:48:45 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=WQBldSFx; 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=JFsfT9KNu+cM1W9lx ghd78eZWN7/Xp8fZ6V+FbY2nIxjxKih8CpPYrisTDXS7Dv/aH2Yt0WvqFKFI/6Zx 0IR8uioLMVk2739Wd5xRhZNJYAKApjhIxamIvr/Jd6XNnwpHS94dTwT/gYLUU5VE RvbczBqimAKblYr9h803Uex1TY= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=P1BH8o2UHs1nIxPwB1omRJe YpXQ=; b=WQBldSFx1YDC9leUldIGN5DPC1Zsl8bKTvEtEoyPYlA+qxZlIU5FB/3 SBTYokLNy2fVBHSsP6P4nHoLGBPGfoVySh0s7OoulWuYIVtbGo/iNsFDBJSR/34z nw2SuhZ5gKesbcOgofeAqkn0Oz2PhK4n3ZG0f2D24GcU3MtFtEGM= Received: (qmail 93706 invoked by alias); 20 Jan 2016 14:48:37 -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 93695 invoked by uid 89); 20 Jan 2016 14:48:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=team X-HELO: mail-ig0-f176.google.com Received: from mail-ig0-f176.google.com (HELO mail-ig0-f176.google.com) (209.85.213.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 20 Jan 2016 14:48:35 +0000 Received: by mail-ig0-f176.google.com with SMTP id t15so103167198igr.0 for ; Wed, 20 Jan 2016 06:48:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=uGUoYKbtcSGmKWoJx8oWCux3g02+ij7mgu8nY4G6N6s=; b=iLMy4LeBe8PzZCF5er2JK4p7bujgIK2NKkf987o2ykeuUOMqacOguyHRax38iytiBc XFPjcwH42H9LW3NXNRGeNcT+6rMD5rv7BzUKwuF4B4nlsxpuZvtgItjLeRctAh0vio9i g5x0vRllxGZeCQEE9cX45FJJFQjiTCOjdDLppvOiXh+vaf9WfB0jaBz4AzX4w2vOlYux Qsw9eedvLGhDD/Hgyfhmt/B7BJLqoRFtiI1eKT/02SSskwCrt+YiQD+UBiEtar2bjXRZ tiFTO/QgSpqdOOjaBSqxkRYobbDp2Xh+zik/N2l4FEwsRHIpUKf/GeP45bIsLgcp1YFk jonA== X-Gm-Message-State: AG10YOTHXlFl+O2LTe/ZGinsfjPe1tHGsGJBi2TpeSWDMNgjzmerpEUnzsCLez+UHjUWbw== X-Received: by 10.50.122.38 with SMTP id lp6mr4099102igb.12.1453301313142; Wed, 20 Jan 2016 06:48:33 -0800 (PST) Received: from msticlxl57.ims.intel.com (irdmzpr02-ext.ir.intel.com. [192.198.151.37]) by smtp.gmail.com with ESMTPSA id 8sm12491451ioe.8.2016.01.20.06.48.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jan 2016 06:48:32 -0800 (PST) Date: Wed, 20 Jan 2016 17:47:59 +0300 From: Ilya Verbin To: Martin Jambor Cc: GCC Patches , Jakub Jelinek Subject: Re: [hsa merge 02/10] Modifications to libgomp proper Message-ID: <20160120144759.GB49431@msticlxl57.ims.intel.com> References: <20160113173925.220029649@virgil.suse.cz> <20160113173925.431228371@virgil.suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160113173925.431228371@virgil.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes On Wed, Jan 13, 2016 at 18:39:27 +0100, Martin Jambor wrote: > * task.c (GOMP_PLUGIN_target_task_completion): Free > firstprivate_copies. Also this change caused 3 fails on intelmicemul: FAIL: libgomp.c/target-32.c execution test FAIL: libgomp.c/target-33.c execution test FAIL: libgomp.c/target-34.c execution test Because ttask->firstprivate_copies is uninitialized for !GOMP_OFFLOAD_CAP_SHARED_MEM. (gdb) p ttask->firstprivate_copies $1 = (void *) 0x1 (gdb) n Program received signal SIGSEGV, Segmentation fault. 0x0000003b076800dc in free () from /lib64/libc.so.6 (gdb) bt #0 0x0000003b076800dc in free () from /lib64/libc.so.6 #1 0x00007ffff7dda871 in GOMP_PLUGIN_target_task_completion (data=0x624ac0) at gcc/libgomp/task.c:585 [...] OK for trunk? libgomp/ * task.c (gomp_create_target_task): Set firstprivate_copies to NULL. -- Ilya diff --git a/libgomp/task.c b/libgomp/task.c index 0f45c44..38d4e9b 100644 --- a/libgomp/task.c +++ b/libgomp/task.c @@ -683,6 +683,7 @@ gomp_create_target_task (struct gomp_device_descr *devicep, ttask->state = state; ttask->task = task; ttask->team = team; + ttask->firstprivate_copies = NULL; task->fn = NULL; task->fn_data = ttask; task->final_task = 0;