From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.bugs Subject: bug#19435: SIGSEGV in PSEUDOVECTOR_TYPEP when using find-file on a RTL filename Date: Wed, 24 Dec 2014 11:36:42 +0300 Message-ID: <549A7B1A.5070304@yandex.ru> References: <87mw6dfr1r.fsf@violet.siamics.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1419410245 18220 80.91.229.3 (24 Dec 2014 08:37:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Dec 2014 08:37:25 +0000 (UTC) Cc: Ivan Shmakov To: 19435@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 24 09:37:16 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y3hRT-0006rc-RZ for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Dec 2014 09:37:15 +0100 Original-Received: from localhost ([::1]:47439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3hRT-0005Fl-3E for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Dec 2014 03:37:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3hRN-0005Fb-FI for bug-gnu-emacs@gnu.org; Wed, 24 Dec 2014 03:37:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y3hRG-0007u1-M1 for bug-gnu-emacs@gnu.org; Wed, 24 Dec 2014 03:37:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3hRG-0007tx-IR for bug-gnu-emacs@gnu.org; Wed, 24 Dec 2014 03:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y3hRG-00066k-BA for bug-gnu-emacs@gnu.org; Wed, 24 Dec 2014 03:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Antipov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Dec 2014 08:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19435 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19435-submit@debbugs.gnu.org id=B19435.141941021123459 (code B ref 19435); Wed, 24 Dec 2014 08:37:02 +0000 Original-Received: (at 19435) by debbugs.gnu.org; 24 Dec 2014 08:36:51 +0000 Original-Received: from localhost ([127.0.0.1]:56196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3hR4-00066J-MI for submit@debbugs.gnu.org; Wed, 24 Dec 2014 03:36:50 -0500 Original-Received: from forward7l.mail.yandex.net ([84.201.143.140]:37681) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3hR2-000669-2L for 19435@debbugs.gnu.org; Wed, 24 Dec 2014 03:36:49 -0500 Original-Received: from smtp4h.mail.yandex.net (smtp4h.mail.yandex.net [84.201.186.21]) by forward7l.mail.yandex.net (Yandex) with ESMTP id E8992BC1657; Wed, 24 Dec 2014 11:36:43 +0300 (MSK) Original-Received: from smtp4h.mail.yandex.net (localhost [127.0.0.1]) by smtp4h.mail.yandex.net (Yandex) with ESMTP id 278612C5C52; Wed, 24 Dec 2014 11:36:43 +0300 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp4h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id FBdNPDueUb-agYCCcfj; Wed, 24 Dec 2014 11:36:42 +0300 (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1419410202; bh=qYiRthM4jW5OjcJbuldhcpUoKRpGgEbBgKlxg1gxfPs=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=N9+zaGI5VQO86drwvupbsQx/4vAaD7xwGZCZrBEgnFvSq2Nd33q0t8NtRw/eQY7Qy qODSeWdVa32XTcG/EM52B089wsOuFL633faD8q2/GwAv5cTHH5jhoN4hFPummLYdS3 /HXIkzk19Nz1VuVUk7qm2iW0Msas7UwXArFMxjdI= Authentication-Results: smtp4h.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 In-Reply-To: <87mw6dfr1r.fsf@violet.siamics.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97699 Archived-At: On 12/24/2014 10:25 AM, Ivan Shmakov wrote: > As of 36c43e95de5e (2014-12-18 16:44:11 +0000), Emacs segfaults > when trying to use find-file on "\u062f\u0646\u06cc" (encoded as > a ASCII-safe Emacs string literal here.) > > Strangely enough, $ emacs -Q handles that filename just fine. > > The backtrace is MIMEd. Reproduced. This seems to be a redisplay glitch since composition_compute_stop_pos makes an attempt to move CMP_IT beyond STRING's boundaries, as handled by the following extra eassert: diff --git a/src/composite.c b/src/composite.c index 8982c90..fa60cc0 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1005,7 +1005,10 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos, while (charpos < endpos) { if (STRINGP (string)) - FETCH_STRING_CHAR_ADVANCE (c, string, charpos, bytepos); + { + eassert (charpos < SCHARS (string) && bytepos < SBYTES (string)); + FETCH_STRING_CHAR_ADVANCE (c, string, charpos, bytepos); + } else FETCH_CHAR_ADVANCE (c, charpos, bytepos); if (c == '\n') Dmitry