From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Possible severe disoptimality in CCL Date: Tue, 07 Nov 2006 11:41:03 +0900 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1162867319 6622 80.91.229.2 (7 Nov 2006 02:41:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Nov 2006 02:41:59 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 07 03:41:54 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GhGtN-0005v0-SN for ged-emacs-devel@m.gmane.org; Tue, 07 Nov 2006 03:40:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GhGtN-0000kJ-G5 for ged-emacs-devel@m.gmane.org; Mon, 06 Nov 2006 21:40:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GhGtC-0000jV-Sr for emacs-devel@gnu.org; Mon, 06 Nov 2006 21:40:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GhGt8-0000YU-6N for emacs-devel@gnu.org; Mon, 06 Nov 2006 21:40:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GhGt8-0000YG-3H for emacs-devel@gnu.org; Mon, 06 Nov 2006 21:40:34 -0500 Original-Received: from [150.29.246.133] (helo=mx1.aist.go.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GhGt4-0007ni-3z; Mon, 06 Nov 2006 21:40:30 -0500 Original-Received: from smtp1.aist.go.jp ([150.29.246.12]) by mx1.aist.go.jp with ESMTP id kA72eFZw001248; Tue, 7 Nov 2006 11:40:17 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id kA72eD6Y011658; Tue, 7 Nov 2006 11:40:13 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1GhGtb-0003uU-00; Tue, 07 Nov 2006 11:41:03 +0900 Original-To: rms@gnu.org, emacs-devel@gnu.org In-reply-to: (message from Richard Stallman on Mon, 06 Nov 2006 15:59:48 -0500) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:61892 Archived-At: In article , Richard Stallman writes: > Can you please DTRT, then ack? [...] > ------- Start of forwarded message ------- > Date: Sun, 05 Nov 2006 23:04:07 -0800 > From: Bob Halley [...] > I then went looking for a reason for ccl.produced to be so wrong. The > CCL program in question has a "buffer magnification" of zero, which > means "produce no bytes". In this case the current destination pointer, > dst, is set to NULL. A NULL dst causes the calculation of ccl->produced > just after the ccl_finish tag in ccl_driver() to be wrong, because the > code does > ccl->produced = dst - destination > I changed this code (patch attached) so that it set ccl->produced to > zero if dst was NULL. With this change, both the type error and the > segfault no longer happen. (The type error is fixed because we're no > longer reading random memory and treating it as encoded characters.) You are right. I was going to change Fccl_execute_on_string to call ccl_driver with DESTINATION = NULL, but it seems that your fix is better. I've just installed it. By the way, this bug doesn't exist in HEAD because it was introduced in emacs-unicode-2 when I changed the interface of ccl_driver (). --- Kenichi Handa handa@m17n.org