[Openmp-commits] [PATCH] D35535: Fix sporadic segfaults in tasking tests

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jul 18 03:05:22 PDT 2017


AndreyChurbanov created this revision.
AndreyChurbanov added a project: OpenMP.

Wrong size calculated for memory copying during re-sizing of array of threads data.

Patch by Terry Wilmarth.


Repository:
  rL LLVM

https://reviews.llvm.org/D35535

Files:
  runtime/src/kmp_tasking.cpp


Index: runtime/src/kmp_tasking.cpp
===================================================================
--- runtime/src/kmp_tasking.cpp
+++ runtime/src/kmp_tasking.cpp
@@ -2573,7 +2573,7 @@
             nthreads * sizeof(kmp_thread_data_t));
         // copy old data to new data
         KMP_MEMCPY_S((void *)new_data, nthreads * sizeof(kmp_thread_data_t),
-                     (void *)old_data, maxthreads * sizeof(kmp_taskdata_t *));
+                     (void *)old_data, maxthreads * sizeof(kmp_thread_data_t));
 
 #ifdef BUILD_TIED_TASK_STACK
         // GEH: Figure out if this is the right thing to do


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35535.107039.patch
Type: text/x-patch
Size: 611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170718/40d4c171/attachment.bin>


More information about the Openmp-commits mailing list