[Openmp-commits] [PATCH] D44637: Fix for https://bugs.llvm.org/show_bug.cgi?id=36705

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 19 10:32:26 PDT 2018


AndreyChurbanov created this revision.
AndreyChurbanov added reviewers: tlwilmar, hbae, jlpeyton.
Herald added a subscriber: openmp-commits.

Debug build of the OpenMP RTL fails with assertion because of wrong th_reap_state flag during library shutdown.
The fix is to mark a thread SAFE_TO_REAP when it is put into the pool of free threads.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D44637

Files:
  runtime/src/kmp_runtime.cpp


Index: runtime/src/kmp_runtime.cpp
===================================================================
--- runtime/src/kmp_runtime.cpp
+++ runtime/src/kmp_runtime.cpp
@@ -5476,6 +5476,7 @@
     balign[b].bb.leaf_kids = 0;
   }
   this_th->th.th_task_state = 0;
+  this_th->th.th_reap_state = KMP_SAFE_TO_REAP;
 
   /* put thread back on the free pool */
   TCW_PTR(this_th->th.th_team, NULL);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44637.138958.patch
Type: text/x-patch
Size: 393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180319/e04cc041/attachment.bin>


More information about the Openmp-commits mailing list