Delete the pthread key on cleanup in TLS mode
to avoid a crash when OpenBLAS was loaded via dlopen and libc tries to clean up the leaked TLS after dlclose Fixes #1720
This commit is contained in:
parent
a5a1118527
commit
bba1e67269
|
@ -1073,6 +1073,11 @@ static volatile int memory_initialized = 0;
|
||||||
}
|
}
|
||||||
free(table);
|
free(table);
|
||||||
}
|
}
|
||||||
|
#if defined(OS_WINDOWS)
|
||||||
|
TlsFree(local_storage_key);
|
||||||
|
#else
|
||||||
|
pthread_key_delete(local_storage_key);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void blas_memory_init(){
|
static void blas_memory_init(){
|
||||||
|
|
Loading…
Reference in New Issue