GNU bug report logs - #17510
24.3.91; Problem with `emacs --daemon' in cygw32 build

Previous Next

Package: emacs;

Reported by: Ken Brown <kbrown <at> cornell.edu>

Date: Fri, 16 May 2014 17:51:02 UTC

Severity: important

Found in version 24.3.91

Fixed in version 24.4

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 17510 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: Ken Brown <kbrown <at> cornell.edu>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 17510 <at> debbugs.gnu.org, dmantipov <at> yandex.ru
Subject: Re: bug#17510: 24.3.91; Problem with `emacs --daemon' in cygw32 build
Date: Sat, 24 May 2014 12:28:58 -0700
[Message part 1 (text/plain, inline)]
On 05/24/2014 05:38 AM, Ken Brown wrote:
> On 5/19/2014 3:25 PM, Ken Brown wrote:
>> On 5/19/2014 12:46 PM, Eli Zaretskii wrote:
>>> I guess it's OK for the branch, thanks.  But it strikes me that simply
>>> replacing the car of dpyinfo->name_list_element by something like
>>> "!!!DELETED DISPLAY!!!", or even just an empty string, would serve the
>>> same purpose, and save us the nuisance of an additional list in
>>> cygw32_display_name_list.  After all, all you need is to mark a
>>> display deleted without actually deleting it, right?  IOW, the main
>>> problem is in x_delete_display, and all the rest is just the overhead
>>> you needed to fix that, correct?
>>
>> I think that's correct, and I agree that there should be a much simpler
>> fix.  I'll have to look into the code and try to understand better
>> exactly what happens when emacs is started as a daemon and then a client
>> frame is opened and closed.
> 
> My guess as to the cause of this bug was completely wrong.  What happens
> in my recipe is that the pointer dpyinfo->w32_id_name is freed twice.
> (This is done in x_delete_display each time the only existing client
> frame is deleted.)  An attempt to create a client frame for the third
> time then leads to a crash because of malloc corruption.

Thanks for finding that. I wonder whether this double-free also has
something to do with random crashes people have been seeing in 64-bit
Cygwin cygw32 Emacs builds.

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 11 years and 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.