From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected Date: Tue, 15 Jan 2013 19:03:33 +0200 Message-ID: <8338y2qsyi.fsf@gnu.org> References: <50F52EC0.2030309@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1358269398 4951 80.91.229.3 (15 Jan 2013 17:03:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2013 17:03:18 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 15 18:03:34 2013 Return-path: Envelope-to: ged-emacs-devel@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 1Tv9vC-00081B-18 for ged-emacs-devel@m.gmane.org; Tue, 15 Jan 2013 18:03:34 +0100 Original-Received: from localhost ([::1]:40021 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv9uu-0004nm-Ms for ged-emacs-devel@m.gmane.org; Tue, 15 Jan 2013 12:03:16 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv9ur-0004nV-OJ for emacs-devel@gnu.org; Tue, 15 Jan 2013 12:03:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tv9uq-0001Hh-JF for emacs-devel@gnu.org; Tue, 15 Jan 2013 12:03:13 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:41827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv9uq-0001HP-BD for emacs-devel@gnu.org; Tue, 15 Jan 2013 12:03:12 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MGO00500FAO7M00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Tue, 15 Jan 2013 19:03:01 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGO004D1FD0QZD0@a-mtaout22.012.net.il>; Tue, 15 Jan 2013 19:03:00 +0200 (IST) In-reply-to: <50F52EC0.2030309@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156392 Archived-At: > Date: Tue, 15 Jan 2013 14:26:08 +0400 > From: Dmitry Antipov > > Steps to reproduce: > > ./src/emacs -Q > M-x eval-expression RET (insert-file-contents "/dev/sda") > > (assuming /dev/sda is a readable block device). I get "Permission denied" on the block devices that I can find on machines to which I have access. But even if that wasn't so, there's no reason to assume that the same data will be found on every hard disk everywhere in the world. If you fetch the first 1KB from that device (using dd or whatever) to a regular file, and do the same with that file, does the crash still happen? If so, please post that file. > #6 0x00000000004ce56f in char_table_ref (table=..., c=c@entry=4195088) at /home/dima/work/stuff/emacs/trunk/src/chartab.c:234 ^^^^^^^^^^^^^^^^^ This preposterous value is the immediate cause of the crash. But the question is: how did we came to that value, thinking it's a characters. Usually, this is the result of interpreting unibyte data as multibyte. We need to establish how did that happen in this case.