all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#42676: 26.3, 27.1-rc1, master: Emacs (X11) segfaults if XIM is set but not XIM_Styles
@ 2020-08-02 14:36 Grégory Mounié
  2020-08-02 17:24 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Grégory Mounié @ 2020-08-02 14:36 UTC (permalink / raw)
  To: 42676

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]


  Hello

  Emacs (emacs -Q with X11) segfaults in xfns.c (create_frame_xic), at 
its initialization, if XIM pointer is set, but not XIM_styles pointer.

  The patch extends the check on xim pointer to add the XIM_Styles 
pointer too.

  The code is at least several years old (git blame write "2014-03" in 
26.3 branch). The bug is present in master, 27.1-rc1 and 26.3 branch.

  The bug triggers today in my settings (emacs 26.3 from my debian/sid 
with gdm3 and windowmaker), but I do not know exactly why yet.

  Have a nice day
  Grégory Mounié

[-- Attachment #2: 0001-Emacs-segfaults-if-xim-is-set-but-not-xim_styles.patch --]
[-- Type: text/x-patch, Size: 775 bytes --]

From 280e1f965e5a4d2521f2c282be6348144f687ee6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9gory=20Mouni=C3=A9?= <Gregory.Mounie@imag.fr>
Date: Sun, 2 Aug 2020 15:56:33 +0200
Subject: [PATCH] Emacs segfaults if xim is set but not xim_styles

Emacs segfaults at the X11 initialization if XIM is set
and xim_styles is NULL.

* src/xfns.c: Check also if FRAME_X_XIM_STYLES(f) is NULL
---
 src/xfns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xfns.c b/src/xfns.c
index 2ab5080d97..09dcbbfb92 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2652,7 +2652,7 @@ create_frame_xic (struct frame *f)
     goto out;
 
   xim = FRAME_X_XIM (f);
-  if (!xim)
+  if (!xim || ! FRAME_X_XIM_STYLES(f))
     goto out;
 
   /* Determine XIC style.  */
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-02 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-02 14:36 bug#42676: 26.3, 27.1-rc1, master: Emacs (X11) segfaults if XIM is set but not XIM_Styles Grégory Mounié
2020-08-02 17:24 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.