emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] XCloseDisplay already calls XrmDestroyDatabase


From: YAMAMOTO Mitsuharu
Subject: Re: [PATCH] XCloseDisplay already calls XrmDestroyDatabase
Date: Wed, 13 May 2009 12:27:01 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Thu, 21 Aug 2008 15:43:21 -0400, Chong Yidong <address@hidden> said:

> "İsmail Dönmez" <address@hidden> writes:
>>>> So looks like there is no need to manually call
>>>> XrmDestroyDatabase() anymore, attached patch removes it.
>>> 
>>> Actually correct solution is to disable XrmDestroyDatabase() call
>>> for GTK+ as done for Xt. See attached patch.
>> 
>> 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
                                address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]