mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 498166 - malloc_init deadlock due to pthread_atfork. r=glandium
This commit is contained in:
parent
7b9cbd7caf
commit
f6b8d2a9b2
@ -5838,11 +5838,6 @@ MALLOC_OUT:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(MOZ_MEMORY_WINDOWS) && !defined(MOZ_MEMORY_DARWIN)
|
|
||||||
/* Prevent potential deadlock on malloc locks after fork. */
|
|
||||||
pthread_atfork(_malloc_prefork, _malloc_postfork, _malloc_postfork);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MALLOC_STATIC_SIZES
|
#ifndef MALLOC_STATIC_SIZES
|
||||||
/* Set variables according to the value of opt_small_max_2pow. */
|
/* Set variables according to the value of opt_small_max_2pow. */
|
||||||
if (opt_small_max_2pow < opt_quantum_2pow)
|
if (opt_small_max_2pow < opt_quantum_2pow)
|
||||||
@ -6045,6 +6040,11 @@ MALLOC_OUT:
|
|||||||
|
|
||||||
malloc_initialized = true;
|
malloc_initialized = true;
|
||||||
|
|
||||||
|
#if !defined(MOZ_MEMORY_WINDOWS) && !defined(MOZ_MEMORY_DARWIN)
|
||||||
|
/* Prevent potential deadlock on malloc locks after fork. */
|
||||||
|
pthread_atfork(_malloc_prefork, _malloc_postfork, _malloc_postfork);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(NEEDS_PTHREAD_MMAP_UNALIGNED_TSD)
|
#if defined(NEEDS_PTHREAD_MMAP_UNALIGNED_TSD)
|
||||||
if (pthread_key_create(&mmap_unaligned_tsd, NULL) != 0) {
|
if (pthread_key_create(&mmap_unaligned_tsd, NULL) != 0) {
|
||||||
malloc_printf("<jemalloc>: Error in pthread_key_create()\n");
|
malloc_printf("<jemalloc>: Error in pthread_key_create()\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user