From b03f950bf377508c588e488b4e5625ae142c80ac Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 30 Jul 2019 07:10:53 -0700 Subject: Fix memory leak in libgomp when using OpenMP 2019-09-10 Kwok Cheung Yeung libgomp/ * config/gcn/team.c (gomp_gcn_exit_kernel): Free GCN thread list. (cherry picked from openacc-gcc-9-branch commit 6cee7b36a0fa68d0ca1ad4cc7fb860c54eaf4c6b) --- libgomp/ChangeLog.omp | 4 ++++ libgomp/config/gcn/team.c | 1 + 2 files changed, 5 insertions(+) diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 9801857..59605cd 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,3 +1,7 @@ +2019-09-10 Kwok Cheung Yeung + + * config/gcn/team.c (gomp_gcn_exit_kernel): Free GCN thread list. + 2019-09-10 Andrew Stubbs * plugin/plugin-gcn.c (HSA_AMD_AGENT_INFO_COMPUTE_UNIT_COUNT): Define. diff --git a/libgomp/config/gcn/team.c b/libgomp/config/gcn/team.c index 79aec65..534cf59 100644 --- a/libgomp/config/gcn/team.c +++ b/libgomp/config/gcn/team.c @@ -93,6 +93,7 @@ void gomp_gcn_exit_kernel (void) { gomp_free_thread (gcn_thrs ()); + free (gcn_thrs ()); } /* This function contains the idle loop in which a thread waits -- cgit v1.1