mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-17 18:36:21 +03:00
Only abort on dlsym when necessary.
If neither background_thread nor lazy_lock is in use, do not abort on dlsym errors.
This commit is contained in:
parent
bdcf40a620
commit
a4d6fe73cf
3 changed files with 19 additions and 3 deletions
|
|
@ -1522,6 +1522,13 @@ background_thread_ctl(tsd_t *tsd, const size_t *mib, size_t miblen,
|
|||
|
||||
background_thread_enabled_set(tsd_tsdn(tsd), newval);
|
||||
if (newval) {
|
||||
if (!can_enable_background_thread) {
|
||||
malloc_printf("<jemalloc>: Error in dlsym("
|
||||
"RTLD_NEXT, \"pthread_create\"). Cannot "
|
||||
"enable background_thread\n");
|
||||
ret = EFAULT;
|
||||
goto label_return;
|
||||
}
|
||||
if (background_threads_enable(tsd)) {
|
||||
ret = EFAULT;
|
||||
goto label_return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue