public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgomp/104385] Segmentation fault when using nested dependent tasks
Date: Tue, 10 May 2022 08:23:26 +0000	[thread overview]
Message-ID: <bug-104385-4-MoulBsTccl@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104385-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104385

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:ae536532103c0cd1116865dbca5cc02ba4ccca12

commit r10-10674-gae536532103c0cd1116865dbca5cc02ba4ccca12
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Feb 8 09:30:17 2022 +0100

    libgomp: Fix segfault with posthumous orphan tasks [PR104385]

    The following patch fixes crashes with posthumous orphan tasks.
    When a parent task finishes, gomp_clear_parent clears the parent
    pointers of its children tasks present in the parent->children_queue.
    But children that are still waiting for dependencies aren't in that
    queue yet, they will be added there only when the sibling they are
    waiting for exits.  Unfortunately we were adding those tasks into
    the queues with the original task->parent which then causes crashes
    because that task is gone and freed.  The following patch fixes that
    by clearing the parent field when we schedule such task for running
    by adding it into the queues and we know that the sibling task which
    is about to finish has NULL parent.

    2022-02-08  Jakub Jelinek  <jakub@redhat.com>

            PR libgomp/104385
            * task.c (gomp_task_run_post_handle_dependers): If parent is NULL,
            clear task->parent.
            * testsuite/libgomp.c/pr104385.c: New test.

    (cherry picked from commit 0af7ef050aed9f678d70d79931ede38374fde863)

  parent reply	other threads:[~2022-05-10  8:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 16:42 [Bug libgomp/104385] New: " wacrenier at labri dot fr
2022-02-04 22:57 ` [Bug libgomp/104385] " pinskia at gcc dot gnu.org
2022-02-04 23:19 ` wacrenier at labri dot fr
2022-02-04 23:25 ` wacrenier at labri dot fr
2022-02-04 23:31 ` pinskia at gcc dot gnu.org
2022-02-05  0:07 ` jakub at gcc dot gnu.org
2022-02-05  2:37 ` pinskia at gcc dot gnu.org
2022-02-07 18:11 ` jakub at gcc dot gnu.org
2022-02-08  8:36 ` cvs-commit at gcc dot gnu.org
2022-02-19  8:02 ` cvs-commit at gcc dot gnu.org
2022-05-10  8:23 ` cvs-commit at gcc dot gnu.org [this message]
2022-05-11  6:24 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:36 ` jakub at gcc dot gnu.org

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=bug-104385-4-MoulBsTccl@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).