Added checks on negative gtid before indexing __kmp_threads.
This makes static analyzers happier.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I don't think so. We don't use negative gtid for unshackled threads, but thanks for the head up.
openmp/runtime/src/kmp.h | ||
---|---|---|
3082 | Do we need to check whether gtid is less than the size of __kmp_threads? |
Comment Actions
LGTM for the gtid changes. there are at least three other things in this commit that need to be split. I don't think they are bad but not described or related to this.
openmp/runtime/src/kmp_itt.inl | ||
---|---|---|
235 | This seems unrelated. | |
openmp/runtime/src/kmp_runtime.cpp | ||
4961 | I guess this is unrelated too. | |
openmp/runtime/src/kmp_sched.cpp | ||
68 | This belongs in a different commit. |
Comment Actions
OK, I will commit the patch in two parts - one pure gtid checks, another one with other arrays/pointers checks.
Do we need to check whether gtid is less than the size of __kmp_threads?