From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 3399@emacsbugs.donarmstrong.com,
Shannon Jones <cz2s20d02@sneakemail.com>
Subject: bug#3399: Crash in multi-TTY mode
Date: Thu, 28 May 2009 09:47:32 +0900 [thread overview]
Message-ID: <wlmy8ycau3.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <jwvk5427h9n.fsf-monnier+emacsbugreports@gnu.org>
>>>>> On Wed, 27 May 2009 10:31:20 -0400, Stefan Monnier <monnier@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@math.s.chiba-u.ac.jp
next prev parent reply other threads:[~2009-05-28 0:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 2:44 bug#3399: Crash in multi-TTY mode Shannon Jones
2009-05-27 8:27 ` YAMAMOTO Mitsuharu
2009-05-27 14:31 ` Stefan Monnier
2009-05-28 0:47 ` YAMAMOTO Mitsuharu [this message]
2009-05-28 1:25 ` YAMAMOTO Mitsuharu
2009-05-28 13:14 ` Stefan Monnier
2009-05-29 3:58 ` YAMAMOTO Mitsuharu
2009-05-29 14:30 ` Stefan Monnier
2009-05-30 2:25 ` YAMAMOTO Mitsuharu
2009-05-30 20:37 ` Stefan Monnier
2009-05-31 7:05 ` YAMAMOTO Mitsuharu
2009-06-01 14:37 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wlmy8ycau3.wl%mituharu@math.s.chiba-u.ac.jp \
--to=mituharu@math.s.chiba-u.ac.jp \
--cc=3399@emacsbugs.donarmstrong.com \
--cc=cz2s20d02@sneakemail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).