[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113275: Try to fix FreeBSD bug re multithreaded mem
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] trunk r113275: Try to fix FreeBSD bug re multithreaded memory allocation. |
Date: |
Thu, 04 Jul 2013 00:53:19 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113275
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/14569
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Wed 2013-07-03 17:53:13 -0700
message:
Try to fix FreeBSD bug re multithreaded memory allocation.
* src/emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
<http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/emacs.c emacs.c-20091113204419-o5vbwnq5f7feedwu-241
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-07-02 16:56:29 +0000
+++ b/src/ChangeLog 2013-07-04 00:53:13 +0000
@@ -1,3 +1,10 @@
+2013-07-04 Paul Eggert <address@hidden>
+
+ Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
+ * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
+ Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
+ <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
+
2013-07-02 Paul Eggert <address@hidden>
* sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
=== modified file 'src/emacs.c'
--- a/src/emacs.c 2013-07-01 21:06:12 +0000
+++ b/src/emacs.c 2013-07-04 00:53:13 +0000
@@ -128,6 +128,7 @@
dumping. Used to work around a bug in glibc's malloc. */
static bool malloc_using_checking;
#elif defined HAVE_PTHREAD && !defined SYSTEM_MALLOC
+extern int _malloc_thread_enabled_p;
extern void malloc_enable_thread (void);
#endif
@@ -681,6 +682,12 @@
stack_base = &dummy;
#endif
+#if defined HAVE_PTHREAD && !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC
+ /* Disable mutexes in gmalloc.c. Otherwise, FreeBSD Emacs recursively
+ loops with pthread_mutex_lock calling calloc and vice versa. */
+ _malloc_thread_enabled_p = 0;
+#endif
+
#ifdef G_SLICE_ALWAYS_MALLOC
/* This is used by the Cygwin build. */
xputenv ("G_SLICE=always-malloc");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113275: Try to fix FreeBSD bug re multithreaded memory allocation.,
Paul Eggert <=