[Bug libgomp/40174] Memory leak when using '#pragma omp parallel'
--- Comment #5 from jakub at gcc dot gnu dot org 2009-05-20 21:15 --- Fixed for 4.4/4.5. -- jakub at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40174
[Bug libgomp/40174] Memory leak when using '#pragma omp parallel'
--- Comment #4 from jakub at gcc dot gnu dot org 2009-05-20 20:55 --- Subject: Bug 40174 Author: jakub Date: Wed May 20 20:55:25 2009 New Revision: 147748 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147748 Log: PR libgomp/40174 * team.c (gomp_thread_start): Destroy thr->release semaphore. (gomp_free_pool_helper): Likewise. Modified: branches/gcc-4_4-branch/libgomp/ChangeLog branches/gcc-4_4-branch/libgomp/team.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40174
[Bug libgomp/40174] Memory leak when using '#pragma omp parallel'
--- Comment #3 from jakub at gcc dot gnu dot org 2009-05-20 20:55 --- Subject: Bug 40174 Author: jakub Date: Wed May 20 20:54:45 2009 New Revision: 147747 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147747 Log: PR libgomp/40174 * team.c (gomp_thread_start): Destroy thr->release semaphore. (gomp_free_pool_helper): Likewise. Modified: trunk/libgomp/ChangeLog trunk/libgomp/team.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40174
[Bug libgomp/40174] Memory leak when using '#pragma omp parallel'
--- Comment #2 from to dot my dot trociny at gmail dot com 2009-05-19 10:06 --- The patch works for me. Actually, calling mutex_destroy in gomp_thread_start() before return was the first my solution and it solved my problem too. But I am not very familiar with libgomp so I was not completely sure if it was safe to release mutex then (I did not do deep investigations how this mutex is used). Releasing it in gomp_team_end(), when all other structures associated with team threads are freed, looked safer for me :-). But it looks as I shouldn't have been so paranoid. Thank you. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40174
[Bug libgomp/40174] Memory leak when using '#pragma omp parallel'
--- Comment #1 from jakub at gcc dot gnu dot org 2009-05-19 07:31 --- Created an attachment (id=17891) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17891&action=view) gcc45-pr40174.patch thr->release is owned by thread, not team, and is initialized by the thread, so it should be each thread that destroys it as well, not the team. Can you please try this patch instead? It makes no difference on Linux, because gomp_sem_destroy is empty inline, so I can't verify it easily. -- jakub at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40174