Skip to content
Commit 93495de2 authored by Jonathan Peyton's avatar Jonathan Peyton
Browse files

Fix crash when libomp loaded/unloaded multiple times

The problem scenario is the following:
A dynamic library, libfoo.so, depends on libomp.so (it creates parallel region
and calls some omp functions).  An application has a loop where it dynamically
loads libfoo.so, calls the function from it, unloads libfoo.so.  After several
loop iterations application crashes with the message about lack of resources
OMP: Error #34: System unable to allocate necessary resources for OMP thread:

The problem is that pthread_kill() was not followed by pthread_join() in case
of terminated thread. This patch fixes this problem for both worker and monitor
threads.

Differential Revision: http://reviews.llvm.org/D21200

llvm-svn: 272567
parent 248190ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment