From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#870: Repeatable instance of bug#870 Date: Wed, 07 Jan 2009 15:53:48 +0900 Message-ID: References: <4961E7F7.2000509@gnu.org> Reply-To: Kenichi Handa , 870@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1231311852 17692 80.91.229.12 (7 Jan 2009 07:04:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Jan 2009 07:04:12 +0000 (UTC) Cc: lekktu@gmail.com, emacs-devel@gnu.org, 870@emacsbugs.donarmstrong.com To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 07 08:04:53 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LKSTD-0008WI-DH for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Jan 2009 08:04:51 +0100 Original-Received: from localhost ([127.0.0.1]:36897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKSRx-0004Or-NS for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Jan 2009 02:03:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKSRu-0004Om-V6 for bug-gnu-emacs@gnu.org; Wed, 07 Jan 2009 02:03:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKSRt-0004Oa-9d for bug-gnu-emacs@gnu.org; Wed, 07 Jan 2009 02:03:30 -0500 Original-Received: from [199.232.76.173] (port=40288 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKSRt-0004OX-6V for bug-gnu-emacs@gnu.org; Wed, 07 Jan 2009 02:03:29 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39744) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LKSRs-0006Fq-It for bug-gnu-emacs@gnu.org; Wed, 07 Jan 2009 02:03:28 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0773OrA028067; Tue, 6 Jan 2009 23:03:24 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n077036N026940; Tue, 6 Jan 2009 23:00:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kenichi Handa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com Resent-Date: Wed, 07 Jan 2009 07:00:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 870 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Original-Received: via spool by 870-submit@emacsbugs.donarmstrong.com id=B870.123131123325698 (code B ref 870); Wed, 07 Jan 2009 07:00:03 +0000 Original-Received: (at 870) by emacsbugs.donarmstrong.com; 7 Jan 2009 06:53:53 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n076ro9E025692 for <870@emacsbugs.donarmstrong.com>; Tue, 6 Jan 2009 22:53:51 -0800 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n076rnMV029640; Wed, 7 Jan 2009 15:53:49 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n076rmoJ004294; Wed, 7 Jan 2009 15:53:48 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id n076rmtV025381; Wed, 7 Jan 2009 15:53:48 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1LKSIW-00083J-BE; Wed, 07 Jan 2009 15:53:48 +0900 In-reply-to: (message from Kenichi Handa on Wed, 07 Jan 2009 10:07:02 +0900) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 07 Jan 2009 02:03:30 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:23858 Archived-At: In article , Kenichi Handa writes: > > It appears that there is a bug in all the decode_coding_* functions when > > a CR lies on a CHARBUF_SIZE (0x4000) boundary with a matching LF on the > > other side of the boundary. > > They all do something like: > > if (eol_crlf && c1 == '\r') > > ONE_MORE_BYTE (byte_after_cr); > > but ONE_MORE_BYTE will abort the decode if it reaches the end of the > > buffer, leaving the CR in limbo between having been read and being added > > to the buffer. Then on decoding the subsequent block, the initial LF > > does not trip the normal CRLF decoding, so it is put into the buffer. > ??? decode_coding_* gets bytes from coding->source and > produces characters in CHARBUF. So, I think the above > analysis is not correct. > As normal visiting of ChangeLog.870 doesn't have the problem > but revisiting it causes the problem, I think the bug is in > Finsert_file_contents; perhaps in the handling of REPLACE. > I'll have a look at it. I fixed the bug. Actually what wrong was decode_coding_* but in the different place as above. --- Kenichi Handa handa@m17n.org