mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-08 20:50:52 -08:00
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>. Fixes: debbugs:14569
This commit is contained in:
parent
96673afeb2
commit
1ce5cd04df
2 changed files with 14 additions and 0 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
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 <eggert@cs.ucla.edu>
|
||||
|
||||
* sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ extern int malloc_set_state (void*);
|
|||
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 @@ main (int argc, char **argv)
|
|||
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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue