GNU bug report logs -
#3399
Crash in multi-TTY mode
Previous Next
Full log
View this message in rfc822 format
>>>>> On Wed, 27 May 2009 10:31:20 -0400, Stefan Monnier <monnier <at> iro.umontreal.ca> said:
>> I think this a bug in libX11. It should either 1) not set
>> XlibDisplayDfltRMDB in XGetDefault unless dpy->db becomes non-NULL
>> or 2) reset XlibDisplayDfltRMDB in XrmSetDatabase even if the
>> previous database is NULL.
> I'm not sure I understand all the details, but I really find the
> workaround hideous (tho I do think you for coming up with it): what
> if we undo your recent change that does
> XrmSetDatabase(dpyinfo->display, NULL) and just free the xrm
> database (i.e. introducing a double-free crash in older libX11)?
> Would this also work around this problem?
[To simplify the argument, I restrict myself to the GTK+ case below.
My recent change includes a fix for the crash in the no-toolkit version.]
The situation is classified into the three cases:
1. Older libX11 that doesn't care about XlibDisplayDfltRMDB at all.
2. Newer libX11, when the first XGetDefault call sets dpy->db to a
non-NULL value.
3. Newer libX11, when the first XGetDefault call sets dpy->db to NULL.
Case 3 corresponds to the problematic scenario I mentioned in my
previous mail and the other cases should work fine currently. Undoing
my recent change means that we don't destroy the database ourselves,
and it leaks memory in Case 2 and 3.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
This bug report was last modified 15 years and 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.