[Openmp-commits] [PATCH] D105308: [OpenMP] Fix a few issues with hidden helper task

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jul 2 03:58:33 PDT 2021


protze.joachim added inline comments.


================
Comment at: openmp/runtime/src/kmp_tasking.cpp:439
 
+  auto hidden_helper = taskdata->td_flags.hidden_helper;
+
----------------
hbae wrote:
> tianshilei1992 wrote:
> > Why this needs to be done in lock? After the task is created, we never change this flag, don't we?
> Observed some weird situations that the flag value changes after releasing the lock whereas there is nothing wrong in the lock implementation and the lock variable passed to it. Also verified that the flag is correct before invoking the actual task function. I don't have an exact root cause of the problem, so this seems to be the best we can do now. 
There is a chance, that another thread steals, executes, and finishes the task and releases the taskdata after the lock is released. So, what you observed might be a read after release.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105308/new/

https://reviews.llvm.org/D105308



More information about the Openmp-commits mailing list