aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/FileOutputBuffer.cpp
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2018-08-24 18:07:35 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2018-08-24 18:07:35 +0000
commita4a9c48c784cb01a36dad9b6aa9e828334df31f6 (patch)
tree398684486812b86cef3d1190bb93ffe5248c57b1 /llvm/lib/Support/FileOutputBuffer.cpp
parent4058e29e7d86c266b9acd50c3b97715ca564a0b0 (diff)
downloadllvm-a4a9c48c784cb01a36dad9b6aa9e828334df31f6.zip
llvm-a4a9c48c784cb01a36dad9b6aa9e828334df31f6.tar.gz
llvm-a4a9c48c784cb01a36dad9b6aa9e828334df31f6.tar.bz2
[OpenMP] Fix tasking bug for decreasing hot team nthreads
The __kmp_execute_tasks_template() function reads the task_team and current_task from the thread structure. There appears to be a pathological timing where the number of threads in the hot team decreases and so a thread is put in the pool via __kmp_free_thread(). It could be the case that: 1) A thread reads th_task_team into task_team local variables and is then interrupted by the OS 2) Master frees the thread and sets current task and task team to NULL 3) The thread reads current_task as NULL When this happens, current_task is dereferenced and a segfault occurs. This patch just checks for current_task to not be NULL as well. Differential Revision: https://reviews.llvm.org/D50651 llvm-svn: 340632
Diffstat (limited to 'llvm/lib/Support/FileOutputBuffer.cpp')
0 files changed, 0 insertions, 0 deletions