Re: Recent libX11 update broke emacs
Kevin Oberman <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.x11 |
|---|---|
| Message-ID | <CAN6yY1uzjoPvsvxZ8q1QimFj1mNdAuYrZNGme93rtG6VVoE5Cg@mail.gmail.com> |
Yes, that fixes the problem. All looks good. Thanks for the quick fix to both you and Ashish! -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: [email protected] PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 On Tue, Aug 4, 2020 at 2:06 AM Niclas Zeising <[email protected]> wrote: > On 2020-08-04 06:48, Ashish SHUKLA wrote: > > On 8/4/20 10:04 AM, Ashish SHUKLA wrote: > >> On 8/4/20 3:38 AM, Niclas Zeising wrote: > >>> On 2020-08-03 19:07, Kevin Oberman wrote: > >>>> This is a weird problem and I'm uncertain if it is in libW11, > > x11-server, > >>>> or emacs. As a result, I'm crossposting to both lists. > >>>> > >>>> Yesterday, after upgrading libX11 and x11-server, I could no longer > run > >>>> Emacs to an X display. It crashed quickly with a segmentation error > >>>> in the > >>>> pthread library. Oddly, I could run it to my local xserver from a > remote > >>>> system. > >>> > >>> Where does the segfault occur before entering pthreads? > >>> > >>>> Rolling back the x11 server did not help nor did rolling back libX11 > or > >>>> even both of them. I had to roll back libX11 first and build the > server > >>>> with the old libX11. Rebuilding emacs with the new ports made no > >>>> difference. > >>> > >>> Which version of the server did you build? The patch to xorg-server is > >>> trivial, just switching out malloc for calloc have the memory 0 > >>> initialized. The patch to libX11 is rather more involved. > >>> It is possible that someone accidentally changed the ABI of libX11, I > >>> guess. What happens if you use the version with just the security > fixes > >>> (the version I committed first, and that was merged to the Q3 branch.) > >>> > >>>> > >>>> Since the old libX11 contains a very serious vulnerability, I really > >>>> hate > >>>> to leave it this way, but I also have a hard time getting anything > done > >>>> without emacs. Nothing other than emacs seems to have a problem with > > this > >>> > >>> There is one commit after libX11 1.6.10, that takes care of a > regression. > >>> Can you apply > >>> > > > https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/93fce3f4e79cbc737d6468a4f68ba3de1b83953b > >>> on top of the libX11 1.6.10 update and see if that fixes anything? > >>> > >>> Regards > >> > >> Able to get Emacs to segfault: > >> > >> λ lldb -e /usr/local/bin/emacs > >> (lldb) target create "/usr/local/bin/emacs" > >> Current executable set to '/usr/local/bin/emacs' (x86_64). > >> (lldb) run -Q > >> Process 36196 launching > >> Process 36196 launched: '/usr/local/bin/emacs' (x86_64) > >> Process 36196 stopped > >> * thread #1, name = 'emacs-28.0.50', stop reason = signal SIGSEGV: > >> invalid address (fault address: 0x0) > >> frame #0: 0x0000000000427ca0 > >> emacs`best_xim_style(xim=0x0000000000000000) at xfns.c:2629:21 > >> (lldb) bt > > [...] > > > >> > >> > >> And workaround is launching Emacs like: env -u XMODIFIERS emacs > >> > >> I'll try the libX11 patch and give it a shot. > > > > Emacs, with libX11 built with the patch, works fine now. It seems like > > it's also reported in Debian[1], and they merged it. Maybe we can do the > > same ? > > > > References: > > [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=966691 > > > > Thank you, I'll see about adding that patch to the port and package then. > It looks like this is both a bug in libX11 and to some extent also emacs? > > Kevin, can you double check that the patch works for you. I find it > strange that you have to rebuild both xorg-server and libX11 for it to > work, are you forcing static linkage somewhere? > Regards > -- > Niclas > _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-x11 To unsubscribe, send any mail to "[email protected]"