all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Amin Bandali <bandali@gnu.org>
Cc: 44506@debbugs.gnu.org
Subject: bug#44506: 28.0.50; Segfault on opening a particular message in Gnus in terminal/tty
Date: Sat, 07 Nov 2020 20:58:46 +0200	[thread overview]
Message-ID: <83zh3t56zd.fsf@gnu.org> (raw)
In-Reply-To: <87sg9l57vx.fsf@gnu.org> (message from Amin Bandali on Sat, 07 Nov 2020 13:39:14 -0500)

> From: Amin Bandali <bandali@gnu.org>
> Date: Sat, 07 Nov 2020 13:39:14 -0500
> 
> I noticed today that when trying to open the following message (attached
> with John's permission) using Gnus in a terminal emulator or a tty in
> GNU/Linux, it results in Emacs quitting with a segfault.  I'm also
> attaching the result of running `bt full' in GDB after the segfault.
> The issue seems related in part to the inclusion of Persian characters
> in the message body.

Just visiting the text you send in "emacs -Q -nw" doesn't cause any
segfaults.  Does it happen to you in "emacs -Q"?

> #0  0x0000555555639248 in encode_terminal_code (src=0x7ffff7f61cc0, src_len=src_len@entry=1, coding=coding@entry=0x555555e7ec00) at term.c:564
>         cmp = 0x0
>         gstring = 0x0
>         i = <optimized out>
>         src_end = 0x7ffff7f61cf0
>         buf = 0x5555561483a0 ' ' <repeats 94 times>, "John ،متسود یسر", '-' <repeats 39 times>
>         nchars = 0
>         nbytes = 0
>         required = <optimized out>
>         tbase = 0x0
>         charset_list = 0x7fffea1f724b

This is an optimized build, so it's hard to understand what caused the
crash.  According to the line number, it crashes here:

	  if (src->u.cmp.automatic)
	    {
	      gstring = composition_gstring_from_id (src->u.cmp.id);
	      required = src->slice.cmp.to - src->slice.cmp.from + 1;
	    }
	  else
	    {
	      cmp = composition_table[src->u.cmp.id];  <<<<<<<<<<<<<<<
	      required = cmp->glyph_len;
	    }

If that is true, then I don't understand how it happened: we don't use
any compositions except automatic in Emacs, so I'm unsure how you get
to that place.  Can you see which place in the code indeed crashes and
why?





  reply	other threads:[~2020-11-07 18:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-07 18:39 bug#44506: 28.0.50; Segfault on opening a particular message in Gnus in terminal/tty Amin Bandali
2020-11-07 18:58 ` Eli Zaretskii [this message]
2020-11-07 20:03   ` Amin Bandali
2020-11-07 20:29     ` Eli Zaretskii
2020-11-08  4:03       ` Eric Abrahamsen
2020-11-08 14:56         ` Eli Zaretskii
2020-11-08 18:27           ` Amin Bandali
2020-11-08 18:54             ` Eli Zaretskii
2020-11-08 19:20               ` Eli Zaretskii
2020-11-08 20:39                 ` Amin Bandali
2020-11-09  3:31                   ` Eli Zaretskii
2020-11-09  4:43                     ` Amin Bandali
2020-11-09  7:04                       ` Eli Zaretskii
2020-11-09 15:57                         ` Eli Zaretskii
2020-11-10  5:42                           ` Amin Bandali
2020-11-10  5:48                           ` Eric Abrahamsen
2020-11-10 15:31                             ` Eli Zaretskii
2020-11-13  5:20                               ` Amin Bandali
2020-11-14 12:14                                 ` Eli Zaretskii
2020-11-14 17:19                                   ` Amin Bandali
2022-04-22 13:38                                   ` Lars Ingebrigtsen
2020-11-08  4:05       ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83zh3t56zd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=44506@debbugs.gnu.org \
    --cc=bandali@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.