public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Julian Brown <julian@codesourcery.com>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: Chung-Lin Tang <cltang@codesourcery.com>,
	<Catherine_Moore@mentor.com>,	<gcc-patches@gcc.gnu.org>,
	Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH 0/6, OpenACC, libgomp] Async re-work
Date: Thu, 06 Dec 2018 22:26:00 -0000	[thread overview]
Message-ID: <20181206222621.16ec00f0@squid.athome> (raw)
In-Reply-To: <20181206222246.1cceb504@squid.athome>

On Thu, 6 Dec 2018 22:22:46 +0000
Julian Brown <julian@codesourcery.com> wrote:

> On Thu, 6 Dec 2018 21:42:14 +0100
> Thomas Schwinge <thomas@codesourcery.com> wrote:
> 
> > [...]
> > ..., where the "Invalid read of size 8" happens, and which
> > eventually would try to "free (tgt)" again, via
> > libgomp/target.c:gomp_unmap_tgt:
> > 
> >     attribute_hidden void
> >     gomp_unmap_tgt (struct target_mem_desc *tgt)
> >     {
> >       /* Deallocate on target the tgt->tgt_start .. tgt->tgt_end
> > region.  */ if (tgt->tgt_end)
> >         gomp_free_device_memory (tgt->device_descr, tgt->to_free);
> >     
> >       free (tgt->array);
> >       free (tgt);
> >     }
> > 
> > Is the "free (tgt)" in libgomp/target.c:gomp_unmap_vars_async wrong,
> > or something else?  
> 
> It might be worth trying this with the refcounting changes in the
> attach/detach patch.

...oh, also make sure you have this patch in the series you're testing
with:

https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01973.html

else your "wait" will be ignored, IIUC.

Julian

  reply	other threads:[~2018-12-06 22:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25 13:10 Chung-Lin Tang
2018-12-06 20:42 ` Thomas Schwinge
2018-12-06 22:22   ` Julian Brown
2018-12-06 22:26     ` Julian Brown [this message]
2018-12-13 15:29       ` Chung-Lin Tang
2018-12-13 15:51         ` Thomas Schwinge
2018-12-14 14:29           ` Chung-Lin Tang
2018-12-17 17:46             ` Thomas Schwinge
2018-12-14 14:04   ` Thomas Schwinge
2018-12-14 14:25 ` Thomas Schwinge
2018-12-14 15:03 ` Thomas Schwinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181206222621.16ec00f0@squid.athome \
    --to=julian@codesourcery.com \
    --cc=Catherine_Moore@mentor.com \
    --cc=cltang@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).