From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#17510: 24.3.91; Problem with `emacs --daemon' in cygw32 build Date: Sat, 24 May 2014 12:28:58 -0700 Message-ID: <5380F2FA.1080007@dancol.org> References: <53764FD9.8090600@cornell.edu> <53766FBC.1000601@cornell.edu> <5377F335.2080609@cornell.edu> <831tvremfz.fsf@gnu.org> <5378C404.8050405@cornell.edu> <83wqdjceah.fsf@gnu.org> <53790BAB.3020909@cornell.edu> <837g5hd8cf.fsf@gnu.org> <537A5AB4.8070602@cornell.edu> <538092B6.9000807@cornell.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8JVlc08lMQIxjcXumooJ0a2QmD89obkxg" X-Trace: ger.gmane.org 1400959829 6830 80.91.229.3 (24 May 2014 19:30:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 May 2014 19:30:29 +0000 (UTC) Cc: 17510@debbugs.gnu.org, dmantipov@yandex.ru To: Ken Brown , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 24 21:30:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WoHe6-0002L0-Vw for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 May 2014 21:30:19 +0200 Original-Received: from localhost ([::1]:49116 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoHe6-0004k7-Ij for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 May 2014 15:30:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoHdy-0004i9-5x for bug-gnu-emacs@gnu.org; Sat, 24 May 2014 15:30:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoHds-0004tU-V0 for bug-gnu-emacs@gnu.org; Sat, 24 May 2014 15:30:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoHds-0004sN-S0 for bug-gnu-emacs@gnu.org; Sat, 24 May 2014 15:30:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WoHdr-0006Hc-UK for bug-gnu-emacs@gnu.org; Sat, 24 May 2014 15:30:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 May 2014 19:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17510 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17510-submit@debbugs.gnu.org id=B17510.140095975924049 (code B ref 17510); Sat, 24 May 2014 19:30:03 +0000 Original-Received: (at 17510) by debbugs.gnu.org; 24 May 2014 19:29:19 +0000 Original-Received: from localhost ([127.0.0.1]:59334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoHd8-0006Fm-QA for submit@debbugs.gnu.org; Sat, 24 May 2014 15:29:19 -0400 Original-Received: from dancol.org ([96.126.100.184]:60191) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoHcw-0006FI-Qm for 17510@debbugs.gnu.org; Sat, 24 May 2014 15:29:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=4zsgIg7A5E3N1FKQtDBfDo14/ofevVDUGHdVPHCrJkg=; b=PTPEjcUVS/eMUgmnAPXhKuKITZ1Lx2FEcV5Gt0nOev4Q8O0WBjtjncMVlM0F6185SAzxEp0Fr6wUc6AuxgK+jLfzqV3kVgWE2zOZFAFMz7NpXDMfpijZDZT8sc8hDPg8aTlOMH/JI90SalZX5Yno+pSTZXFEYpj6lErPc7hm5r0hXqXFATClVGQnWncUOXczOLvPWVJwxe4C2R8tFxShUNlsFRx7PAP2QacN4E6Dyvk9RTqjTrnmiL9v89MQUwOQdYHoJnjRBVvmhAopRK10fxFBiq7xCDRYm52Y0sfDV1NlPCeXceJel29q4o2JAJQb0ZzE8vPThV0ehwGHD6PcGA==; Original-Received: from [2601:8:b240:264::2b1] by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1WoHcp-0002Lu-Mc; Sat, 24 May 2014 12:28:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <538092B6.9000807@cornell.edu> X-Enigmail-Version: 1.6 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89461 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8JVlc08lMQIxjcXumooJ0a2QmD89obkxg Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 simpl= y >>> replacing the car of dpyinfo->name_list_element by something like >>> "!!!DELETED DISPLAY!!!", or even just an empty string, would serve th= e >>> 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 simple= r >> 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 clie= nt >> frame is opened and closed. >=20 > My guess as to the cause of this bug was completely wrong. What happen= s > 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. --8JVlc08lMQIxjcXumooJ0a2QmD89obkxg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTgPL6AAoJEMAaIROpHW7I+4QP/0R13GPfshuKe+OCHWIobFTP Y0QKeNLDx0N3kLjM4dk6EUk7+leYL9ua2G4Y7l64PnV7jx2nszhUqL8Y986Xw8tj grivklCXMWrnpfh7+QXYV9TNO39bnuAMy9ZzSFbe3p+lqJJtGVwDXf3U+15+C6rR aq9tzQ3d259mjJqA6pmROkJf6hi/9Kn2pt5UfXOUGY26+cqb50z1Ab4L4JPeMmN1 WdOztUw64syNDLgqbQU2BDhFMmT1walwIGohOW1zTuurEnaHOY+0GX0dPiXsyKgL 4+781+N6nP39s56cCM91y3SdFLa8zxO11l2YQElVeSpcKp7a4PdPfr1UcjOn/QwF T20xPFVP3+x//JTCx88ozHTNWMqwxghU0Q/+6DZKEbMm8qGuKN+JMhFIZ/ik2zzh 15cNLDsRklORkiHtOI9Stp+9edH5OYNNTcdIERLuZVY+ZkvdZs8DB8C7qN59zl5P Rt2Q1cCJta3g88/Ux0i1FLwwCZncuMgY0LrRynBRI2qisj4gG5tnAruuvjqgsQuc 8JXEuBQJ3YiIS2/mspH+gb+8rLcW/WARD+YXUpL8K9ouwGtbb+++ObHUR7mHK25a ACG3k3jC/FD7dh3vlKUZYzO/LKIY5XR3wBgAHRmkbuipCokuAQqFSBV+A6+fl76v yhCudXmIDm2Et7s3twdI =c1XU -----END PGP SIGNATURE----- --8JVlc08lMQIxjcXumooJ0a2QmD89obkxg--