From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] XCloseDisplay already calls XrmDestroyDatabase Date: Wed, 13 May 2009 12:27:01 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <19e566510808190319r454900a7sc3b5a4e9d6d68f95@mail.gmail.com> <19e566510808200117y21e78086la6240ad72b676cd7@mail.gmail.com> <19e566510808211140n56bec8e7l7ac7d6ae156e29eb@mail.gmail.com> <87k5eataqu.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1242185246 5551 80.91.229.12 (13 May 2009 03:27:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 May 2009 03:27:26 +0000 (UTC) Cc: =?UTF-8?B?xLBzbWFpbCA=?= =?ISO-8859-1?Q?D=F6nmez?= , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 13 05:27:15 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M457h-0002ee-R5 for ged-emacs-devel@m.gmane.org; Wed, 13 May 2009 05:27:14 +0200 Original-Received: from localhost ([127.0.0.1]:33721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M457a-0007Xh-PA for ged-emacs-devel@m.gmane.org; Tue, 12 May 2009 23:27:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M457V-0007XW-EP for emacs-devel@gnu.org; Tue, 12 May 2009 23:27:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M457Q-0007X7-VW for emacs-devel@gnu.org; Tue, 12 May 2009 23:27:01 -0400 Original-Received: from [199.232.76.173] (port=47070 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M457Q-0007Wx-Jp for emacs-devel@gnu.org; Tue, 12 May 2009 23:26:56 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:56825) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M457W-0002oY-ER for emacs-devel@gnu.org; Tue, 12 May 2009 23:27:02 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 696602C40; Wed, 13 May 2009 12:27:01 +0900 (JST) In-Reply-To: <87k5eataqu.fsf@cyd.mit.edu> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by monty-python.gnu.org: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110844 Archived-At: >>>>> On Thu, 21 Aug 2008 15:43:21 -0400, Chong Yidong said: > "=C4=B0smail D=C3=B6nmez" writes: >>>> So looks like there is no need to manually call >>>> XrmDestroyDatabase() anymore, attached patch removes it. >>>=20 >>> Actually correct solution is to disable XrmDestroyDatabase() call >>> for GTK+ as done for Xt. See attached patch. >>=20 >> Any comments on this? It fixes a frequent crash for me. > I've checked in the patch. Thanks. I tried reverting it, but I couldn't reproduce the crash using the procedure in Bug#581 with Ubuntu 9.04, GTK+ build. I also tried setting a breakpoint to XrmDestroyDatabase, but I couldn't observe its call from XCloseDisplay on closing an X11 display. On the other hand, Bug#1812 says the similar crash happens even without X toolkit on Mac OS X 10.4. The same binary does not crash on Mac OS X 10.5. I think necessity of the XrmDestroyDatabase call depends on which version of libX11 is used rather than whether GTK+ is used or not. The relevant change in libX11 would be: http://lists.freedesktop.org/archives/xorg-commit-diffs/2004-March/000239= .html I confirmed that the libX11 shipped with Mac OS X 10.4 doesn't contain the above change. http://www.opensource.apple.com/source/X11/X11-0.46.4/xc/lib/X11/ If we remove the XrmDestroyDatabase call unconditionally, then it causes a memory leak when used with a newer libX11. But that would be better than crashing when used with an older one. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp