[OpenMP] Check loc for NULL before dereferencing it
authorBryan Chan <bryan.chan@huawei.com>
Mon, 7 Jun 2021 14:37:24 +0000 (10:37 -0400)
committerBryan Chan <bryan.chan@huawei.com>
Mon, 7 Jun 2021 14:45:48 +0000 (10:45 -0400)
commit54f059c9007b48e4ff700ac587cbb137fff91fb7
tree1f0f927ba10e85714ec4d8db540da40ebd048fcc
parente1da3297d253b33be1ff941cf9ed9091dd332ea5
[OpenMP] Check loc for NULL before dereferencing it

The ident_t * argument in __kmp_get_monotonicity was being used without
a customary NULL check, causing the function to crash in a Debug build.
Release builds were not affected thanks to dead store elimination.
openmp/runtime/src/kmp_dispatch.cpp