[Openmp-commits] [PATCH] D21384: Fix for crash in task dependencies

Terry Wilmarth via Openmp-commits openmp-commits at lists.llvm.org
Wed Jun 15 09:00:26 PDT 2016


tlwilmar created this revision.
tlwilmar added reviewers: AndreyChurbanov, jlpeyton.
tlwilmar added a subscriber: openmp-commits.
tlwilmar set the repository for this revision to rL LLVM.

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




Repository:
  rL LLVM

http://reviews.llvm.org/D21384

Files:
  runtime/src/kmp_taskdeps.cpp

Index: runtime/src/kmp_taskdeps.cpp
===================================================================
--- runtime/src/kmp_taskdeps.cpp
+++ runtime/src/kmp_taskdeps.cpp
@@ -552,7 +552,7 @@
     //   - 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;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21384.60845.patch
Type: text/x-patch
Size: 687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20160615/cdb43efa/attachment.bin>


More information about the Openmp-commits mailing list