https://bugs.llvm.org/show_bug.cgi?id=35171

            Bug ID: 35171
           Summary: Merge r317115 into the 5.0 branch: Fix race condition
                    in omp_init_lock
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Runtime Library
          Assignee: unassignedb...@nondot.org
          Reporter: hah...@hahnjo.de
                CC: andrey.churba...@intel.com, jpeyto...@gmail.com,
                    llvm-bugs@lists.llvm.org, tstel...@redhat.com
            Blocks: 34492

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.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=34492
[Bug 34492] [meta] 5.0.1 Release Blockers
-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to