Subject: bug#59715: 28.2; Emacs crashes after ``turkish-case-conversion-enable''

From: Eli Zaretskii <[email-masked]>
Date: Fri, 02 Dec 2022 09:23:19 +0200

> From: YUSUF ALPER ÇIKIŞIR
>  <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 02 Dec 2022 01:26:10 +0300
> 
> Thread 1 (LWP 4992 ".emacs-28.2-rea"):
> #0  0x00007ffff5b17c30 in raise () from /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libpthread.so.0
> #1  0x00000000004257f2 in terminate_due_to_signal ()
> #2  0x0000000000425c88 in emacs_abort ()
> #3  0x0000000000424bb1 in realize_face[cold] ()
> #4  0x00000000004dbb59 in realize_basic_faces ()
> #5  0x00000000004dd23d in recompute_basic_faces ()
> #6  0x00000000004591a5 in init_iterator ()
> #7  0x00000000004654a5 in gui_consider_frame_title ()

OK, now we are getting somewhere, thanks.

First, is it possible that the buffer that was the current one when this
happened had a name with one or more Turkish non-ASCII characters?

Next, please run Emacs under GDB like this:

  $ gdb /path/to/emacs
  ...
  (gdb) break xfaces.c:5847
  (gdb) run

Then repeat what you do to reproduce the problem.  Once the breakpoint
breaks, please do in GDB:

  (gdb) print cache
  (gdb) print cache->f
  (gdb) print cache->f->output_method

If the breakpoint somehow doesn't break, and you end up seeing this:

  Thread 1 ".emacs-28.2-rea" received signal SIGABRT, Aborted.
  0x00007ffff5b17c30 in raise () from /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libpthread.so.0

then do the following:

  (gdb) thread 1
  (gdb) frame 3
  (gdb) print cache
  (gdb) print cache->f
  (gdb) print cache->f->output_method

After "frame 3" make sure GDB says you are inside the call to realize_face,
otherwise the above commands will not produce useful results.  If you are
not inside realize_face, find the number of the callstack frame for
realize_face call and use it instead of 3.  The frame number is the one
shown in the output of the "bt" command, as #NN at the beginning of each
callstack frame.  For example, the frame number for the call to
redisplay_internal below is 8:

> #8  0x0000000000470b39 in redisplay_internal ()
  ^^

> Yes, now I'm using the default emacs-28.2 package in GNU Guix.

Do you happen to know whether this distribution includes any changes to the
upstream Emacs sources, or installs some site-init files that are used
during startup?