Subject: bug#3399: Crash in multi-TTY mode

From: Stefan Monnier <[email-masked]>
Date: Fri, 29 May 2009 10:30:09 -0400

>> What if (as asked) we don't just undo your change, but additionally
>> return to freeing the DB (so we'll get a crash in case 1)?  Will we then
>> also get a crash in case 2 or 3?

> It will crash in Case 3 as well as 1.  XCloseDisplay destroys the
> associated database because XlibDisplayDfltRMDB is set, although the
> database was not actually what's allocated by some XGetDefault call.
> That's why I consider this is a bug in libX11.

Thanks, so yes, that sounds like a plain bug in libX11.

Now I'm not sure if I prefer the crash or the hideous workaround.
At the very least, the hideous workaround should be wrapped in
"#ifdef HIDEOUS_WORKAROUND" (or some more descriptive name).  Ideally,
we could then use an autoconf macro to only activate the workaround when
needed.

        Stefan