[Openmp-commits] [PATCH] D96893: [OpenMP] libomp minor cleanup
Joachim Protze via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Mar 17 05:30:53 PDT 2021
protze.joachim added a comment.
The problem with the test code is, that the dependency node for `task if(0)` is allocated on stack (in __kmpc_omp_wait_deps kmp_taskdeps.cpp:773).
Adding `KMP_ASSERT(node.dn.nrefs==1);` after the while loop in this function reveals, that although the runtime thinks the dependences are resolved, some depnodes still reference the stack-allocated depnode (how can this be? is this a valid state?). These depnodes will access the stack-allocated depnode after the function returns. So, the values for n are random values from other function stacks.
If there is actually a meaningful usecase for such reference situation, we will need to replace the stack allocation by heap allocation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96893/new/
https://reviews.llvm.org/D96893
More information about the Openmp-commits
mailing list