projects
/
platform
/
upstream
/
openblas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5a1118
)
Delete the pthread key on cleanup in TLS mode
author
Martin Kroeker
<martin@ruby.chemie.uni-freiburg.de>
Sat, 29 Dec 2018 20:59:31 +0000
(21:59 +0100)
committer
GitHub
<noreply@github.com>
Sat, 29 Dec 2018 20:59:31 +0000
(21:59 +0100)
to avoid a crash when OpenBLAS was loaded via dlopen and libc tries to clean up the leaked TLS after dlclose
Fixes #1720
driver/others/memory.c
patch
|
blob
|
history
diff --git
a/driver/others/memory.c
b/driver/others/memory.c
index
36815a3
..
6f7a7db
100644
(file)
--- a/
driver/others/memory.c
+++ b/
driver/others/memory.c
@@
-1073,6
+1073,11
@@
static volatile int memory_initialized = 0;
}
free(table);
}
+#if defined(OS_WINDOWS)
+ TlsFree(local_storage_key);
+#else
+ pthread_key_delete(local_storage_key);
+#endif
}
static void blas_memory_init(){