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

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jul 2 08:13:57 PDT 2021


tianshilei1992 added inline comments.


================
Comment at: openmp/runtime/src/kmp_tasking.cpp:439
 
+  auto hidden_helper = taskdata->td_flags.hidden_helper;
+
----------------
protze.joachim wrote:
> 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.
Oh, yeah, it could be because the task has already been pushed.


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