https://bugs.llvm.org/show_bug.cgi?id=49312
Bug ID: 49312
Summary: [OpenMP] UB when hidden helper threads is 1
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Runtime Library
Assignee: unassignedb...@nondot.org
Reporter: rofir...@gmail.com
CC: llvm-bugs@lists.llvm.org
Hi,
while investigating another issue, we found that the macro
`KMP_GTID_TO_SHADOW_GTID` is defined in `kmp.h` as follows
#define KMP_GTID_TO_SHADOW_GTID(gtid)
((gtid) % (__kmp_hidden_helper_threads_num - 1) + 2)
When there is only one helper thread the macro attempts to compute `(gtid % 0)
- 2`. Setting the environment variable `LIBOMP_NUM_HIDDEN_HELPER_THREADS` to
`1` should be enough to trigger this.
Perhaps using only one helper thread is not valid?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs