[Openmp-commits] [openmp] r272949 - Fix for crash in task dependencies

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Thu Jun 16 13:18:31 PDT 2016


Author: jlpeyton
Date: Thu Jun 16 15:18:31 2016
New Revision: 272949

URL: http://llvm.org/viewvc/llvm-project?rev=272949&view=rev
Log:
Fix for crash in task dependencies

With single thread using __kmpc_omp_wait_deps segfaults in OpenMP runtime.
Offloading with depend also encounters this problem when we generate
kmpc_omp_wait_deps instead of kmpc_omp_task_with_deps.

Patch by Alex Duran

Differential Revision: http://reviews.llvm.org/D21384

Modified:
    openmp/trunk/runtime/src/kmp_taskdeps.cpp

Modified: openmp/trunk/runtime/src/kmp_taskdeps.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_taskdeps.cpp?rev=272949&r1=272948&r2=272949&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_taskdeps.cpp (original)
+++ openmp/trunk/runtime/src/kmp_taskdeps.cpp Thu Jun 16 15:18:31 2016
@@ -552,7 +552,7 @@ __kmpc_omp_wait_deps ( ident_t *loc_ref,
     //   - if the dephash is not yet created it means we have nothing to wait for
     bool ignore = current_task->td_flags.team_serial || current_task->td_flags.tasking_ser || current_task->td_flags.final;
 #if OMP_45_ENABLED
-    ignore = ignore && thread->th.th_task_team->tt.tt_found_proxy_tasks == FALSE;
+    ignore = ignore && thread->th.th_task_team != NULL && thread->th.th_task_team->tt.tt_found_proxy_tasks == FALSE;
 #endif
     ignore = ignore || current_task->td_dephash == NULL;
 




More information about the Openmp-commits mailing list