llvm-project/openmp
Jonathan Peyton 3d18a37ca9 [OpenMP] Fix race condition in omp_init_lock
This is a partial fix for bug 34050.

This prevents callers of omp_set_lock (which does not hold __kmp_global_lock)
from ever seeing an uninitialized version of __kmp_i_lock_table.table.

It does not solve a use-after-free race condition if omp_set_lock obtains a
pointer to __kmp_i_lock_table.table before it is updated and then attempts to
dereference afterwards. That race is far less likely and can be handled in a
separate patch.

The unit test usually segfaults on the current trunk revision. It passes with
the patch.

Patch by Adam Azarchs

Differential Revision: https://reviews.llvm.org/D39439

llvm-svn: 317115
2017-11-01 19:44:42 +00:00
..
libomptarget [OpenMP] libomptarget: move debugging dumps under control of env var LIBOMPTARGET_DEBUG 2017-08-14 15:09:59 +00:00
offload Liboffload: Patch for MPSS > 3.4.x (provided by Tim Cramer) 2015-05-06 10:58:40 +00:00
runtime [OpenMP] Fix race condition in omp_init_lock 2017-11-01 19:44:42 +00:00
testsuite Apply name change to testsuite file. 2015-06-01 04:24:23 +00:00
www Support of mips & mips64 for openmprtl 2016-12-08 09:22:24 +00:00
.arcconfig Add a .arcconfig file for openmp. 2017-07-08 16:09:47 +00:00
.gitignore Create a git ignore file for openmp runtime. 2017-03-11 13:05:08 +00:00
CMakeLists.txt [CMake] Disable building libomptarget and add CMake switch 2017-07-26 13:55:00 +00:00
CREDITS.txt Test commit: sort names in CREDITS.txt 2017-10-30 16:44:00 +00:00
LICENSE.txt Update copyright year in LICENSE.txt 2016-05-17 20:11:26 +00:00