[Openmp-commits] [PATCH] D21336: Bug fix: crash if teams executed on host.

Terry Wilmarth via Openmp-commits openmp-commits at lists.llvm.org
Tue Jun 14 12:46:09 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.

Bug fix: crash if teams executed on host.
Added argv array check/allocation for parallel directly nested
inside the teams construct, as new coming Fortran codegen
passes parameters directly into __kmpc_fork_call missing same
parameters in __kmpc_fork_teams (earlier codegen passed to
parallel the subset of parameter passed to teams, and thus
no check/allocation needed).

Patch by Andrey Churbanov

Repository:
  rL LLVM

http://reviews.llvm.org/D21336

Files:
  runtime/src/kmp_runtime.c

Index: runtime/src/kmp_runtime.c
===================================================================
--- runtime/src/kmp_runtime.c
+++ runtime/src/kmp_runtime.c
@@ -1494,6 +1494,7 @@
         //     The team is actual (hot), all workers are ready at the fork barrier.
         //     No lock needed to initialize the team a bit, then free workers.
         parent_team->t.t_ident = loc;
+        __kmp_alloc_argv_entries( argc, parent_team, TRUE );
         parent_team->t.t_argc  = argc;
         argv = (void**)parent_team->t.t_argv;
         for( i=argc-1; i >= 0; --i )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21336.60725.patch
Type: text/x-patch
Size: 574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20160614/9473ae57/attachment.bin>


More information about the Openmp-commits mailing list