SOURCES: xulrunner-bug-460933.patch (NEW) - prevent hangs
arekm
arekm at pld-linux.org
Sat Nov 29 22:18:39 CET 2008
Author: arekm Date: Sat Nov 29 21:18:39 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- prevent hangs
---- Files affected:
SOURCES:
xulrunner-bug-460933.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/xulrunner-bug-460933.patch
diff -u /dev/null SOURCES/xulrunner-bug-460933.patch:1.1
--- /dev/null Sat Nov 29 22:18:40 2008
+++ SOURCES/xulrunner-bug-460933.patch Sat Nov 29 22:18:33 2008
@@ -0,0 +1,27 @@
+Bug 460933: Call pthread_atfork() to prevent potential deadlock after forking.
+
+diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c
+--- a/memory/jemalloc/jemalloc.c
++++ b/memory/jemalloc/jemalloc.c
+@@ -1286,6 +1286,9 @@
+ static uint64_t reserve_crit(size_t size, const char *fname, uint64_t seq);
+ static void reserve_fail(size_t size, const char *fname);
+
++void _malloc_prefork(void);
++void _malloc_postfork(void);
++
+ /*
+ * End function prototypes.
+ */
+@@ -5691,6 +5694,11 @@
+ #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
++
+ /* Set variables according to the value of opt_small_max_2pow. */
+ if (opt_small_max_2pow < opt_quantum_2pow)
+ opt_small_max_2pow = opt_quantum_2pow;
================================================================
More information about the pld-cvs-commit
mailing list