aboutsummaryrefslogtreecommitdiff
path: root/runtime/src/kmp_tasking.cpp
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2018-12-13 23:18:55 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2018-12-13 23:18:55 +0000
commit76357147329374a5768f1a7488d17f7c84b55ffe (patch)
tree275ce16096b28b83edc317317e8835e6ee04584b /runtime/src/kmp_tasking.cpp
parent09185848651b1cfab16634c40b3151ec5dad9567 (diff)
[OpenMP] Fix transient divide by zero bug in 32-bit code
The value returned by __kmp_now_nsec() can overflow 32-bit values causing incorrect values to be returned. The overflow can end up causing a divide by zero error because in __kmp_initialize_system_tick(), the value (__kmp_now_nsec() - nsec) can end up being much larger than the numerator: 1e6 * (delay + (now - goal)) during a pathological timing where the current time calculated is much larger than nsec. When this happens, the value of __kmp_ticks_per_msec is set to zero which is then used as the denominator in the KMP_NOW_MSEC() macro leading to the divide by zero error. Differential Revision: https://reviews.llvm.org/D55300 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@349090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/src/kmp_tasking.cpp')
0 files changed, 0 insertions, 0 deletions