[Openmp-commits] [openmp] r284747 - Fixed memory leak mistakenly introduced by https://reviews.llvm.org/D23115
Andrey Churbanov via Openmp-commits
openmp-commits at lists.llvm.org
Thu Oct 20 10:14:18 PDT 2016
Author: achurbanov
Date: Thu Oct 20 12:14:17 2016
New Revision: 284747
URL: http://llvm.org/viewvc/llvm-project?rev=284747&view=rev
Log:
Fixed memory leak mistakenly introduced by https://reviews.llvm.org/D23115
Differential Revision: http://reviews.llvm.org/D25510
Modified:
openmp/trunk/runtime/src/kmp_tasking.c
Modified: openmp/trunk/runtime/src/kmp_tasking.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_tasking.c?rev=284747&r1=284746&r2=284747&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_tasking.c (original)
+++ openmp/trunk/runtime/src/kmp_tasking.c Thu Oct 20 12:14:17 2016
@@ -579,9 +579,11 @@ __kmp_free_task_and_ancestors( kmp_int32
#if OMP_45_ENABLED
// Proxy tasks must always be allowed to free their parents
// because they can be run in background even in serial mode.
- kmp_int32 task_serial = taskdata->td_flags.task_serial && !taskdata->td_flags.proxy;
+ kmp_int32 team_serial = ( taskdata->td_flags.team_serial ||
+ taskdata->td_flags.tasking_ser ) && !taskdata->td_flags.proxy;
#else
- kmp_int32 task_serial = taskdata->td_flags.task_serial;
+ kmp_int32 team_serial = taskdata->td_flags.team_serial ||
+ taskdata->td_flags.tasking_ser;
#endif
KMP_DEBUG_ASSERT( taskdata -> td_flags.tasktype == TASK_EXPLICIT );
@@ -603,7 +605,7 @@ __kmp_free_task_and_ancestors( kmp_int32
// Stop checking ancestors at implicit task
// instead of walking up ancestor tree to avoid premature deallocation of ancestors.
- if ( task_serial || taskdata -> td_flags.tasktype == TASK_IMPLICIT )
+ if ( team_serial || taskdata -> td_flags.tasktype == TASK_IMPLICIT )
return;
// Predecrement simulated by "- 1" calculation
More information about the Openmp-commits
mailing list