Subject: bug#14569: 24.3.50; bootstrap fails on Cygwin

From: Paul Eggert <[email-masked]>
Date: Mon, 24 Jun 2013 07:34:27 -0700

On 06/24/2013 04:02 AM, Ken Brown wrote:
> Can you explain why you think there's a race condition bug in Cygwin glib?

It clearly has that feel.  The problem is that if one does this:

  g_source_unref (g_child_watch_source_new (getpid ());

at the obvious spot in Emacs startup, just as glib is
spinning worker threads that do stuff, Emacs goes
kaflooey.  But if one waits until the worker threads
have stabilized (which is what the latest patch does),
it's OK.

It could be a bug in Emacs too.  Emacs's memory allocator
isn't thread-safe, right?  And glib uses threads.  Which
memory allocator is the Cygwin port using, exactly?  If
it's using Emacs's allocator (i.e., compiling gmalloc.c),
that's a bug in Emacs.  If it's using Cygwin's, it's more
likely a bug either in the Cygwin allocator or in glib.