summaryrefslogtreecommitdiffstats
path: root/openmp
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2016-06-16 18:47:38 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2016-06-16 18:47:38 +0000
commit7cf08d42996c7028696c3db4898f6bd88c75947c (patch)
tree16a54a9459e4ea0efeff7c366603e197ef352ba7 /openmp
parent95eeb7730dd9ceff4b2740f127171200f809f5e2 (diff)
downloadbcm5719-llvm-7cf08d42996c7028696c3db4898f6bd88c75947c.tar.gz
bcm5719-llvm-7cf08d42996c7028696c3db4898f6bd88c75947c.zip
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 Differential Revision: http://reviews.llvm.org/D21336 llvm-svn: 272935
Diffstat (limited to 'openmp')
-rw-r--r--openmp/runtime/src/kmp_runtime.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c
index f53177d0e39..131d5a3044a 100644
--- a/openmp/runtime/src/kmp_runtime.c
+++ b/openmp/runtime/src/kmp_runtime.c
@@ -1494,6 +1494,7 @@ __kmp_fork_call(
// 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 )
OpenPOWER on IntegriCloud