llvm-project/openmp/runtime/test
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
..
api Fix memory error in case of reinit using kmp_set_defaults() for lock code. 2017-01-18 07:02:21 +00:00
atomic Remove trailing whitespace from tests 2016-05-17 21:08:52 +00:00
barrier omp_barrier.c test fixed in order to reliably and faster run on any number of processors 2016-01-25 16:52:10 +00:00
critical
env Fix implementation of OMP_THREAD_LIMIT 2017-07-27 20:58:41 +00:00
flush
lock [OpenMP] Fix race condition in omp_init_lock 2017-11-01 19:44:42 +00:00
master Remove trailing whitespace from tests 2016-05-17 21:08:52 +00:00
misc_bugs Test cancellation_for_sections.c expectedly fails on GCC 2017-04-04 14:39:52 +00:00
ompt Update implementation of OMPT to the specification OpenMP 5.0 Preview 1 (TR4). 2017-11-01 10:08:30 +00:00
parallel Make test/parallel/omp_nested.c not use so many threads 2017-06-27 03:04:25 +00:00
tasking Add C++ support for testcases 2017-10-20 19:42:32 +00:00
threadprivate Remove trailing whitespace from tests 2016-05-17 21:08:52 +00:00
worksharing OpenMP 4.5: implemented support of schedule(simd:guided) and 2017-06-05 17:17:33 +00:00
CMakeLists.txt Update implementation of OMPT to the specification OpenMP 5.0 Preview 1 (TR4). 2017-11-01 10:08:30 +00:00
lit.cfg Update implementation of OMPT to the specification OpenMP 5.0 Preview 1 (TR4). 2017-11-01 10:08:30 +00:00
lit.site.cfg.in Update implementation of OMPT to the specification OpenMP 5.0 Preview 1 (TR4). 2017-11-01 10:08:30 +00:00
omp_my_sleep.h
omp_testsuite.h Allow unit testing on Windows 2016-05-23 17:50:32 +00:00