[llvm] [OpenMP] Fix crash with duplicate mapping on target directive (PR #146136)
Robert Imschweiler via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 13:03:36 PDT 2025
ro-i wrote:
Thanks for fixing this!
I'm a little confused by what you wrote about the runtime behavior. In the code comment, you wrote:
> [...] But, the shadow pointer is only initialised on the target for
> // the first copy, and the second copy clobbers it. So, this condition
> // avoids the (second) copy here if we have already set shadow pointer info.
In your PR post, you mentioned that for step 4 "the previous shadow pointer metadata is still present, so the runtime doesn't modify the target pointer a second time."
So, the runtime (before the fix) didn't do the same data copy twice, but instead overwrote the previously correct shadow pointer info with the host pointer metadata leading to the target pointer point to the host memory?
https://github.com/llvm/llvm-project/pull/146136
More information about the llvm-commits
mailing list