[Openmp-commits] [openmp] [OpenMP] Fix work-stealing stack clobber with taskwait (PR #126049)
via Openmp-commits
openmp-commits at lists.llvm.org
Thu Feb 6 09:33:08 PST 2025
jprotze wrote:
> But, on the task-stealing path, the task's depnode pointer is still pointing to the stack from its **original** thread, not the one it actually executes on (the stack frame that actually lives in __kmpc_omp_taskwait_deps_51, that the fix for PR85963 took pains to keep alive).
If a task has a pointer to this depnode object on the stack, it means the taskwait depends on that task and the task needs to finish before the taskwait can complete.
> So when the second thread comes along and allocates a "new" depnode, it's actually using a chunk of (stack) memory that is still in use by the first thread.
Please explain, where allocating a new depnode will use the stack memory.
https://github.com/llvm/llvm-project/pull/126049
More information about the Openmp-commits
mailing list