https://bugs.llvm.org/show_bug.cgi?id=49723
Bug ID: 49723
Summary: Possible access to freed stack memory in
__kmpc_omp_wait_deps
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Runtime Library
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
As reported in https://reviews.llvm.org/D96893, the test
openmp/runtime/test/ompt/tasks/task_if0-depend.c leads to an assertion, when
the runtime is built in debug mode (the test triggers a KMP_DEBUG_ASSERT).
Adding `KMP_ASSERT(node.dn.nrefs==1);` at the end of the `__kmpc_omp_wait_deps`
function reveals, that some depnodes still have references to the depnode
representing the task if0 dependency node. These depnodes will try to release
the stack-allocated depnode object, after it was destroyed by returning from
`__kmpc_omp_wait_deps`.
It might be necessary to replace the stack allocation by heap allocation.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs