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#18610: 24.4.50; Specific file causing emacs to segfault upon opening Date: Fri, 03 Oct 2014 15:22:12 +0400 Message-ID: <542E86E4.2030205@yandex.ru> References: <87eguqbk5m.fsf@gmail.com> <87iok2iio2.fsf@geodiff-mac3.ulb.ac.be> <83egupin8y.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070107090700000407030400" X-Trace: ger.gmane.org 1412335409 9903 80.91.229.3 (3 Oct 2014 11:23:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Oct 2014 11:23:29 +0000 (UTC) Cc: 18610@debbugs.gnu.org, maden.ldm@gmail.com To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 03 13:23:23 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 1Xa0xG-0002wp-DZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2014 13:23:22 +0200 Original-Received: from localhost ([::1]:38901 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa0xD-00061g-T4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2014 07:23:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa0x4-00061R-0N for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 07:23:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xa0ww-0001Na-W3 for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 07:23:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa0ww-0001NQ-SM for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 07:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xa0ww-0001xm-CK for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 07:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Antipov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Oct 2014 11:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18610 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18610-submit@debbugs.gnu.org id=B18610.14123353407398 (code B ref 18610); Fri, 03 Oct 2014 11:23:02 +0000 Original-Received: (at 18610) by debbugs.gnu.org; 3 Oct 2014 11:22:20 +0000 Original-Received: from localhost ([127.0.0.1]:59828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xa0wF-0001vD-SD for submit@debbugs.gnu.org; Fri, 03 Oct 2014 07:22:20 -0400 Original-Received: from forward3l.mail.yandex.net ([84.201.143.136]:50142) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xa0wC-0001ut-1Z for 18610@debbugs.gnu.org; Fri, 03 Oct 2014 07:22:17 -0400 Original-Received: from smtp12.mail.yandex.net (smtp12.mail.yandex.net [95.108.131.191]) by forward3l.mail.yandex.net (Yandex) with ESMTP id 1E3781501533; Fri, 3 Oct 2014 15:22:14 +0400 (MSK) Original-Received: from smtp12.mail.yandex.net (localhost [127.0.0.1]) by smtp12.mail.yandex.net (Yandex) with ESMTP id 5E7F616A0654; Fri, 3 Oct 2014 15:22:13 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp12.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id mcVavQ7lMO-MD5qMmac; Fri, 3 Oct 2014 15:22:13 +0400 (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: a6ffa092-4c52-4c3c-a34c-842e2140402b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1412335333; bh=Y/dk3YTi/h0soKtvXbw9t20pg2cT5H/dDHZveuxjbiE=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=Wd/ldnGopFvfaHFeQEj6++tpfnQFKRl71sOjG7aYo+IzF1I+vP3VTIS22yRSpE/mO O0wwKiRnAJ9YNxki40f9i0lqLh82D287STq2HCbTYo77DvzEnurTjHEbQ4y8d1X2Bf E4EYmDFDIUzpNeHCQBxJuZEnSm1SmQK7Tr9yy9Fc= Authentication-Results: smtp12.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.1.2 In-Reply-To: <83egupin8y.fsf@gnu.org> 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:94086 Archived-At: This is a multi-part message in MIME format. --------------070107090700000407030400 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 10/03/2014 12:14 PM, Eli Zaretskii wrote: > I'll continue looking into this. There is a reduced sample which is just 194 bytes (attached). This file has the following structure (hex bytes): 3B 19 5B 07 6F 3A 1B 53 61 73 73 3A 3A 53 65 6C 65 63 74 6F 72 3A 3A 50 61 72 65 6E ^^ escape (1) 74 07 3A 0E 40 66 69 6C 65 6E 61 6D 65 22 00 3B 14 69 1A 6F 3A 1B 53 61 73 73 3A 3A 53 65 6C 65 63 74 6F 72 3A 3A 50 73 65 75 64 6F 0A 3B 0B 5B 06 22 0A 68 6F 76 65 72 3B 12 3A 0A 63 6C 61 73 73 3B 1D 40 01 96 3B 14 69 1A 3A 09 40 61 72 67 30 3A 0D 40 ^^ first non-ASCII byte (2) 73 6F 75 72 63 65 73 6F 3A 08 53 65 74 06 3A 0A 40 68 61 73 68 7B 00 3A 0D 40 73 75 62 6A 65 63 74 30 3B 1D 40 01 96 3B 14 69 1A 3B 1D 40 01 96 3B 14 69 1A 3B 14 69 1A 3A 0B 40 73 70 6C 61 74 30 3B 14 69 06 3A 0A 40 61 72 67 73 5B 00 3B 14 69 06 The whole thing is really subtle: when detect_coding is called, it finds (1) and calls to detect_coding_iso_2022, which returns 1. Since this happens before detect_coding finds (2), this function assumes that the whole data is in one of 7-bit (?) ISO-2022 encoding. Thus, no conversion is performed, and decode_coding_gap inserts the data as is; this way we end up with 96 3B byte sequence in buffer text. Dmitry --------------070107090700000407030400 Content-Type: text/plain; charset=UTF-8; name="bug18610_crash.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="bug18610_crash.txt" OxlbB286G1Nhc3M6OlNlbGVjdG9yOjpQYXJlbnQHOg5AZmlsZW5hbWUiADsUaRpvOhtTYXNz OjpTZWxlY3Rvcjo6UHNldWRvCjsLWwYiCmhvdmVyOxI6CmNsYXNzOx1AAZY7FGkaOglAYXJn MDoNQHNvdXJjZXNvOghTZXQGOgpAaGFzaHsAOg1Ac3ViamVjdDA7HUABljsUaRo7HUABljsU aRo7FGkaOgtAc3BsYXQwOxRpBjoKQGFyZ3NbADsUaQY= --------------070107090700000407030400--