emacs works fine with x11-libs/libX11-1.6.9, but when I updated this dependency to x11-libs/libX11-1.6.10, emacs immediately crashes
The emacs package is app-editors/emacs-27.0.91, but I don't think it's related as it hasn't been updated for a while.
This problem is reproducible with all USE but X disabled on app-editors/emacs.
Steps to Reproduce:
1. install app-editors/emacs-27.0.91 while making sure x11-libs/libX11-1.6.10 is installed
2. run emacs without "-nw"
Emacs crashed with following message:
Cannot open input method - using XLookupString.
Fatal error 11: Segmentation fault
 773 segmentation fault emacs
The original thread is https://forums.gentoo.org/viewtopic-p-8486980.html, in which I attempted to get more info with gdb. I did manage to get some stack trace but some debugging symbols are still missing to reveal anything useful to me.
Created attachment 652436 [details]
emerge --info 'x11-libs/libX11' emacs
Could you try get debugging symbols with https://wiki.gentoo.org/wiki/Debugging?
Created attachment 652438 [details]
Now I realized for whatever reason, running executable with exec-file command in gdb is different than just run gdb with the binary, so `gdb /usr/bin/emacs` does provide more info about what's going on. I followed https://wiki.gentoo.org/wiki/Debugging to apply both debugsyms and installsources to both emacs and libX11. Result of `gdb /usr/bin/emacs` is uploaded to attachments.
This could be https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues/116 after some poking around.
I cannot reproduce the problem (with emacs-27.0.91 and libX11-1.6.10, same USE flags as yours).
Created attachment 652446 [details, diff]
This patch is downloade directly from https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/40, authored by Yichao Yu.
I can confirm this patch fixed the problem on my side.
Re to comment #6:
I suspect this has something to do with input methods - I have fcitx installed and my .xsession exports few environment variables that could be related:
(In reply to Javran Cheng from comment #7)
> Created attachment 652446 [details, diff] [details, diff]
> upstream patch
> This patch is downloade directly from
> https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/40, authored
> by Yichao Yu.
This has been merged into master upstream.
The bug has been closed via the following commit(s):
Author: Matt Turner <email@example.com>
AuthorDate: 2020-08-06 17:25:04 +0000
Commit: Matt Turner <firstname.lastname@example.org>
CommitDate: 2020-08-06 17:26:14 +0000
x11-libs/libX11: Version bump to 1.6.11
Signed-off-by: Matt Turner <email@example.com>
x11-libs/libX11/Manifest | 1 +
x11-libs/libX11/libX11-1.6.11.ebuild | 30 ++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+)