[Openmp-commits] [openmp] r272935 - Bug fix: crash if teams executed on host
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jun 16 11:47:39 PDT 2016
Author: jlpeyton
Date: Thu Jun 16 13:47:38 2016
New Revision: 272935
URL: http://llvm.org/viewvc/llvm-project?rev=272935&view=rev
Log:
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
Modified:
openmp/trunk/runtime/src/kmp_runtime.c
Modified: openmp/trunk/runtime/src/kmp_runtime.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.c?rev=272935&r1=272934&r2=272935&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.c (original)
+++ openmp/trunk/runtime/src/kmp_runtime.c Thu Jun 16 13:47:38 2016
@@ -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 )
More information about the Openmp-commits
mailing list