diff options
| author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2016-06-16 20:18:31 +0000 |
|---|---|---|
| committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2016-06-16 20:18:31 +0000 |
| commit | c505ab6733997775b4aa9cd64cca455b79a7a371 (patch) | |
| tree | c04863d01472a2a67c425e75f176cc2474428db7 /openmp/runtime | |
| parent | fd6ad5bba91f04796a2a5263d70d55dfe579413b (diff) | |
| download | bcm5719-llvm-c505ab6733997775b4aa9cd64cca455b79a7a371.tar.gz bcm5719-llvm-c505ab6733997775b4aa9cd64cca455b79a7a371.zip | |
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
llvm-svn: 272949
Diffstat (limited to 'openmp/runtime')
| -rw-r--r-- | openmp/runtime/src/kmp_taskdeps.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_taskdeps.cpp b/openmp/runtime/src/kmp_taskdeps.cpp index 90117109078..46ba5df9c8c 100644 --- a/openmp/runtime/src/kmp_taskdeps.cpp +++ b/openmp/runtime/src/kmp_taskdeps.cpp @@ -552,7 +552,7 @@ __kmpc_omp_wait_deps ( ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps, kmp_de // - 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; |

