From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83zh3t56zd.fsf@gnu.org> References: <87sg9l57vx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16117"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44506@debbugs.gnu.org To: Amin Bandali Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 07 19:59:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbTQb-00045l-V6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 19:59:09 +0100 Original-Received: from localhost ([::1]:36856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbTQa-0000mu-MI for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 13:59:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbTQU-0000ml-Hk for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 13:59:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kbTQU-0004d1-8a for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 13:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kbTQU-0005co-59; Sat, 07 Nov 2020 13:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Sat, 07 Nov 2020 18:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44506 X-GNU-PR-Package: emacs,gnus Original-Received: via spool by 44506-submit@debbugs.gnu.org id=B44506.160477553421609 (code B ref 44506); Sat, 07 Nov 2020 18:59:02 +0000 Original-Received: (at 44506) by debbugs.gnu.org; 7 Nov 2020 18:58:54 +0000 Original-Received: from localhost ([127.0.0.1]:59275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbTQM-0005cT-AA for submit@debbugs.gnu.org; Sat, 07 Nov 2020 13:58:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbTQK-0005cE-9o for 44506@debbugs.gnu.org; Sat, 07 Nov 2020 13:58:52 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34464) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbTQF-0004ce-0I for 44506@debbugs.gnu.org; Sat, 07 Nov 2020 13:58:47 -0500 Original-Received: from [176.228.60.248] (port=1654 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kbTQC-0006cZ-Vm; Sat, 07 Nov 2020 13:58:45 -0500 In-Reply-To: <87sg9l57vx.fsf@gnu.org> (message from Amin Bandali on Sat, 07 Nov 2020 13:39:14 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192849 Archived-At: > From: Amin Bandali > 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 = > src_end = 0x7ffff7f61cf0 > buf = 0x5555561483a0 ' ' , "John ،متسود یسر", '-' > nchars = 0 > nbytes = 0 > required = > 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?