Skip to content

Commit 771f0fb

Browse files
committed
[OpenMP] Add NULL check in dispatcher debug output
Patch by Nawrin Sultana Differential Revision: https://reviews.llvm.org/D90403
1 parent 7a2abf5 commit 771f0fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

openmp/runtime/src/kmp_dispatch.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,8 @@ static int __kmp_dispatch_next(ident_t *loc, int gtid, kmp_int32 *p_last,
20162016
"__kmp_dispatch_next: T#%%d serialized case: p_lb:%%%s "
20172017
"p_ub:%%%s p_st:%%%s p_last:%%p %%d returning:%%d\n",
20182018
traits_t<T>::spec, traits_t<T>::spec, traits_t<ST>::spec);
2019-
KD_TRACE(10, (buff, gtid, *p_lb, *p_ub, *p_st, p_last, *p_last, status));
2019+
KD_TRACE(10, (buff, gtid, *p_lb, *p_ub, *p_st, p_last,
2020+
(p_last ? *p_last : 0), status));
20202021
__kmp_str_free(&buff);
20212022
}
20222023
#endif

0 commit comments

Comments
 (0)