From unknown Tue Jun 17 20:20:51 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#8751 <8751@debbugs.gnu.org> To: bug#8751 <8751@debbugs.gnu.org> Subject: Status: 24.0.50; CCL is broken Reply-To: bug#8751 <8751@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:20:51 +0000 retitle 8751 24.0.50; CCL is broken reassign 8751 emacs submitter 8751 Kazuhiro Ito severity 8751 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat May 28 08:50:14 2011 Received: (at submit) by debbugs.gnu.org; 28 May 2011 12:50:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QQIy5-0006wm-OL for submit@debbugs.gnu.org; Sat, 28 May 2011 08:50:14 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QQIy1-0006wY-GX for submit@debbugs.gnu.org; Sat, 28 May 2011 08:50:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQIxv-0003s8-L2 for submit@debbugs.gnu.org; Sat, 28 May 2011 08:50:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:51012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQIxv-0003s4-JO for submit@debbugs.gnu.org; Sat, 28 May 2011 08:50:03 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQIxu-0006zR-Rs for bug-gnu-emacs@gnu.org; Sat, 28 May 2011 08:50:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQIxt-0003r8-VK for bug-gnu-emacs@gnu.org; Sat, 28 May 2011 08:50:02 -0400 Received: from msa102.auone-net.jp ([61.117.18.162]:43425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQIxt-0003pn-D1 for bug-gnu-emacs@gnu.org; Sat, 28 May 2011 08:50:01 -0400 Received: from GUNGNIR.med.osaka-cu.ac.jp (121-87-193-138f1.nar1.eonet.ne.jp [121.87.193.138]) by msa102.auone-net.jp (au one net msa) with ESMTP id 470A6360038; Sat, 28 May 2011 21:49:47 +0900 (JST) Date: Sat, 28 May 2011 21:49:35 +0900 From: Kazuhiro Ito To: bug-gnu-emacs@gnu.org Subject: 24.0.50; CCL is broken User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/23.3.50 (i386-mingw-nt6.1.7601) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Message-Id: <20110528124948.470A6360038@msa102.auone-net.jp> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.9 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) Below code raises error "Error in CCL program at 4th code" on trunk. (progn (define-ccl-program ccl-test '(1 (loop (read r0) (write-repeat r0)))) (ccl-execute-on-string 'ccl-test (make-vector 9 0) "_")) -- Kazuhiro Ito From debbugs-submit-bounces@debbugs.gnu.org Mon May 30 09:09:44 2011 Received: (at 8751) by debbugs.gnu.org; 30 May 2011 13:09:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QR2E4-0008Lp-BX for submit@debbugs.gnu.org; Mon, 30 May 2011 09:09:44 -0400 Received: from msa106.auone-net.jp ([61.117.18.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QR2E0-0008Lb-LD for 8751@debbugs.gnu.org; Mon, 30 May 2011 09:09:43 -0400 Received: from GUNGNIR.med.osaka-cu.ac.jp (unknown [114.179.36.76]) by msa106.auone-net.jp (au one net msa) with ESMTP id D45704B803A; Mon, 30 May 2011 22:09:33 +0900 (JST) Date: Mon, 30 May 2011 22:09:30 +0900 From: Kazuhiro Ito Subject: Re: bug#8751: 24.0.50; CCL is broken To: 8751@debbugs.gnu.org In-Reply-To: <20110528124948.470A6360038@msa102.auone-net.jp> References: <20110528124948.470A6360038@msa102.auone-net.jp> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/23.3.50 (i386-mingw-nt6.1.7601) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Message-Id: <20110530130933.D45704B803A@msa106.auone-net.jp> X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 8751 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) The problem may be that ccl-compiler produce negative integer as CCL code (at latest, since Emacs21). (ccl-compile '(1 (loop (read r0) (write-repeat r0)))) -> [1 4 14 -506 22] ~~~~ But the document of ccl.c says "CCL code is a sequence of 28-bit non-negative integers", and current ccl.c does not accept such negative value. I don't know which whould be changed, ccl-compiler or document and current ccl.c. Kazuhiro Ito wrote: > > Below code raises error "Error in CCL program at 4th code" on trunk. > > (progn > (define-ccl-program ccl-test > '(1 (loop > (read r0) > (write-repeat r0)))) > (ccl-execute-on-string 'ccl-test (make-vector 9 0) "_")) -- Kazuhiro Ito From debbugs-submit-bounces@debbugs.gnu.org Mon May 30 12:02:02 2011 Received: (at 8751) by debbugs.gnu.org; 30 May 2011 16:02:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QR4un-0003d7-VS for submit@debbugs.gnu.org; Mon, 30 May 2011 12:02:02 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QR4um-0003cg-Aq for 8751@debbugs.gnu.org; Mon, 30 May 2011 12:02:01 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:38656 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QR4ug-00069O-5S; Mon, 30 May 2011 12:01:54 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 6759E660D3; Mon, 30 May 2011 13:01:51 -0300 (ART) From: Stefan Monnier To: Paul Eggert Subject: Re: bug#8751: 24.0.50; CCL is broken Message-ID: References: <20110528124948.470A6360038@msa102.auone-net.jp> Date: Mon, 30 May 2011 13:01:51 -0300 In-Reply-To: <20110528124948.470A6360038@msa102.auone-net.jp> (Kazuhiro Ito's message of "Sat, 28 May 2011 21:49:35 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8751 Cc: Kazuhiro Ito , 8751@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) Paul, can you take a look at this? It seems this was introduced very recently, probably by * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'. ccl: add integer overflow checks * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT): (IN_INT_RANGE): New macros. (ccl_driver): Use them to check for integer overflow when decoding a CCL program. Many of the new checks are whether XINT (x) fits in int; it doesn't always, on 64-bit hosts. The new version doesn't catch all possible integer overflows, but it's an improvement. (Bug#8719) -- Stefan >>>>> "Kazuhiro" == Kazuhiro Ito writes: > Below code raises error "Error in CCL program at 4th code" on trunk. > (progn > (define-ccl-program ccl-test > '(1 (loop > (read r0) > (write-repeat r0)))) > (ccl-execute-on-string 'ccl-test (make-vector 9 0) "_")) > -- > Kazuhiro Ito From debbugs-submit-bounces@debbugs.gnu.org Mon May 30 12:04:19 2011 Received: (at 8751) by debbugs.gnu.org; 30 May 2011 16:04:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QR4x0-0003gB-9z for submit@debbugs.gnu.org; Mon, 30 May 2011 12:04:18 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QR4wz-0003fz-7T for 8751@debbugs.gnu.org; Mon, 30 May 2011 12:04:17 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:38657 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QR4wt-0006EV-Qt; Mon, 30 May 2011 12:04:12 -0400 Received: by ceviche.home (Postfix, from userid 20848) id C553F660D3; Mon, 30 May 2011 13:04:09 -0300 (ART) From: Stefan Monnier To: Kazuhiro Ito Subject: Re: bug#8751: 24.0.50; CCL is broken Message-ID: References: <20110528124948.470A6360038@msa102.auone-net.jp> <20110530130933.D45704B803A@msa106.auone-net.jp> Date: Mon, 30 May 2011 13:04:09 -0300 In-Reply-To: <20110530130933.D45704B803A@msa106.auone-net.jp> (Kazuhiro Ito's message of "Mon, 30 May 2011 22:09:30 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8751 Cc: 8751@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > The problem may be that ccl-compiler produce negative integer as CCL > code (at latest, since Emacs21). The negative number is normal (it's due to the relative instruction address for the backward jump at the end of the loop). The problem must be in the ccl.c code. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon May 30 19:26:42 2011 Received: (at 8751) by debbugs.gnu.org; 30 May 2011 23:26:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRBr7-0004mr-RU for submit@debbugs.gnu.org; Mon, 30 May 2011 19:26:42 -0400 Received: from msa105.auone-net.jp ([61.117.18.165]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRBr3-0004mc-W2 for 8751@debbugs.gnu.org; Mon, 30 May 2011 19:26:40 -0400 Received: from GUNGNIR.med.osaka-cu.ac.jp (unknown [114.179.36.76]) by msa105.auone-net.jp (au one net msa) with ESMTP id 273942C803A; Tue, 31 May 2011 08:26:29 +0900 (JST) Date: Tue, 31 May 2011 08:26:24 +0900 From: Kazuhiro Ito To: Stefan Monnier Subject: Re: bug#8751: 24.0.50; CCL is broken In-Reply-To: References: <20110528124948.470A6360038@msa102.auone-net.jp> <20110530130933.D45704B803A@msa106.auone-net.jp> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/23.3.50 (i386-mingw-nt6.1.7601) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Message-Id: <20110530232630.273942C803A@msa105.auone-net.jp> X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 8751 Cc: Paul Eggert , 8751@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) > > The problem may be that ccl-compiler produce negative integer as CCL > > code (at latest, since Emacs21). > > The negative number is normal (it's due to the relative instruction > address for the backward jump at the end of the loop). The problem must > be in the ccl.c code. If that is right (and I think so, too), the comment of ccl.c should be fixed. > /* CCL code is a sequence of 28-bit non-negative integers (i.e. the ~~~~~~~~~~~~ > MSB is always 0), each contains CCL command and/or arguments in the > following format: > > |----------------- integer (28-bit) ------------------| > |------- 17-bit ------|- 3-bit --|- 3-bit --|- 5-bit -| > |--constant argument--|-register-|-register-|-command-| > ccccccccccccccccc RRR rrr XXXXX > or > |------- relative address -------|-register-|-command-| > cccccccccccccccccccc rrr XXXXX > or > |------------- constant or other args ----------------| > cccccccccccccccccccccccccccc > > where, `cc...c' is a non-negative integer indicating constant value ~~~~~~~~~~~~ > (the left most `c' is always 0) or an absolute jump address, `RRR' > and `rrr' are CCL register number, `XXXXX' is one of the following > CCL commands. */ Here is a quick fix for actual code, but I don't check whether there is other problems. === modified file 'src/ccl.c' --- src/ccl.c 2011-05-27 21:24:11 +0000 +++ src/ccl.c 2011-05-30 22:19:52 +0000 @@ -100,6 +100,7 @@ CCL commands. */ #define CCL_CODE_MAX ((1 << (28 - 1)) - 1) +#define CCL_CODE_MIN (- CCL_CODE_MAX - 1) /* CCL commands @@ -756,7 +757,7 @@ while (0) #define GET_CCL_CODE(code, ccl_prog, ic) \ - GET_CCL_RANGE (code, ccl_prog, ic, 0, CCL_CODE_MAX) + GET_CCL_RANGE (code, ccl_prog, ic, CCL_CODE_MIN, CCL_CODE_MAX) #define GET_CCL_INT(var, ccl_prog, ic) \ GET_CCL_RANGE (var, ccl_prog, ic, INT_MIN, INT_MAX) -- Kazuhiro Ito From debbugs-submit-bounces@debbugs.gnu.org Mon May 30 22:16:56 2011 Received: (at 8751-done) by debbugs.gnu.org; 31 May 2011 02:16:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QREVr-0008Pe-VA for submit@debbugs.gnu.org; Mon, 30 May 2011 22:16:56 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QREVp-0008PM-CH; Mon, 30 May 2011 22:16:54 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 646BB39E8100; Mon, 30 May 2011 19:16:47 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gfTjg6uGb4kk; Mon, 30 May 2011 19:16:47 -0700 (PDT) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id EEFCF39E80F0; Mon, 30 May 2011 19:16:46 -0700 (PDT) Message-ID: <4DE44F88.1060706@cs.ucla.edu> Date: Mon, 30 May 2011 19:16:40 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: Kazuhiro Ito Subject: Re: bug#8751: 24.0.50; CCL is broken References: <20110528124948.470A6360038@msa102.auone-net.jp> <20110530130933.D45704B803A@msa106.auone-net.jp> <20110530232630.273942C803A@msa105.auone-net.jp> In-Reply-To: <20110530232630.273942C803A@msa105.auone-net.jp> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 8751-done Cc: 8719@debbugs.gnu.org, Stefan Monnier , 8751-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) > Here is a quick fix for actual code, but I don't check whether there > is other problems. Thanks, I came up with something similar independently, and installed a fix into the trunk (bzr 104441). This fix adjusted the comment as best I could. Bug#8719 and Bug#8751 are related so I'll CC: this to bug 8719 to give Kenichi Handa a heads-up. From debbugs-submit-bounces@debbugs.gnu.org Tue May 31 01:13:20 2011 Received: (at 8751) by debbugs.gnu.org; 31 May 2011 05:13:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRHGZ-0003mF-UJ for submit@debbugs.gnu.org; Tue, 31 May 2011 01:13:20 -0400 Received: from mx1.aist.go.jp ([150.29.246.133]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRHGW-0003lw-O4 for 8751@debbugs.gnu.org; Tue, 31 May 2011 01:13:18 -0400 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id p4V5CtI7016729; Tue, 31 May 2011 14:12:56 +0900 (JST) env-from (handa@m17n.org) Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id p4V5CtWY009461; Tue, 31 May 2011 14:12:55 +0900 (JST) env-from (handa@m17n.org) Received: by smtp3.aist.go.jp with ESMTP id p4V5CsLN021003; Tue, 31 May 2011 14:12:54 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.71) (envelope-from ) id 1QRHGA-0000s1-Gs; Tue, 31 May 2011 14:12:54 +0900 From: Kenichi Handa To: Kazuhiro Ito Subject: Re: bug#8751: 24.0.50; CCL is broken In-Reply-To: <20110530232630.273942C803A@msa105.auone-net.jp> (message from Kazuhiro Ito on Tue, 31 May 2011 08:26:24 +0900) Date: Tue, 31 May 2011 14:12:54 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 8751 Cc: eggert@cs.ucla.edu, monnier@iro.umontreal.ca, 8751@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Sorry for the late response on this matter. In article <20110530232630.273942C803A@msa105.auone-net.jp>, Kazuhiro Ito writes: > > > The problem may be that ccl-compiler produce negative integer as CCL > > > code (at latest, since Emacs21). > > > > The negative number is normal (it's due to the relative instruction > > address for the backward jump at the end of the loop). The problem must > > be in the ccl.c code. > If that is right (and I think so, too), the comment of ccl.c should be > fixed. > > /* CCL code is a sequence of 28-bit non-negative integers (i.e. the Yes, this comment is wrong. It seems that I have forgotten to update it when I changed CCL to accept negative integer. > Here is a quick fix for actual code, but I don't check whether there > is other problems. > === modified file 'src/ccl.c' > --- src/ccl.c 2011-05-27 21:24:11 +0000 > +++ src/ccl.c 2011-05-30 22:19:52 +0000 > @@ -100,6 +100,7 @@ > CCL commands. */ > #define CCL_CODE_MAX ((1 << (28 - 1)) - 1) > +#define CCL_CODE_MIN (- CCL_CODE_MAX - 1) > /* CCL commands > @@ -756,7 +757,7 @@ > while (0) > #define GET_CCL_CODE(code, ccl_prog, ic) \ > - GET_CCL_RANGE (code, ccl_prog, ic, 0, CCL_CODE_MAX) > + GET_CCL_RANGE (code, ccl_prog, ic, CCL_CODE_MIN, CCL_CODE_MAX) > #define GET_CCL_INT(var, ccl_prog, ic) \ > GET_CCL_RANGE (var, ccl_prog, ic, INT_MIN, INT_MAX) Sorry but I still don't have a time to check the recent change. If the above patch fixes the code to match with the following revised comment, it is the right patch. /* CCL code is a sequence of 28-bit integers, each contains CCL command and/or arguments in the following format: |----------------- integer (28-bit) ------------------| |------- 17-bit ------|- 3-bit --|- 3-bit --|- 5-bit -| |--constant argument--|-register-|-register-|-command-| ccccccccccccccccc RRR rrr XXXXX or |------- relative address -------|-register-|-command-| cccccccccccccccccccc rrr XXXXX or |------------- constant or other args ----------------| cccccccccccccccccccccccccccc where, `cc...c' is a 17-bit, 20-bit, or 28-bit integer indicating a constant value or a relative/absolute jump address, `RRR' and `rrr' are CCL register number, `XXXXX' is one of the following CCL command codes. */ --- Kenichi Handa handa@m17n.org From debbugs-submit-bounces@debbugs.gnu.org Tue May 31 01:40:00 2011 Received: (at 8751) by debbugs.gnu.org; 31 May 2011 05:40:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRHgO-0004L8-Dl for submit@debbugs.gnu.org; Tue, 31 May 2011 01:40:00 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRHgI-0004Kr-JV for 8751@debbugs.gnu.org; Tue, 31 May 2011 01:39:59 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 6482F39E8100; Mon, 30 May 2011 22:39:48 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NfJ7zv3NabF5; Mon, 30 May 2011 22:39:48 -0700 (PDT) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 181E139E80E0; Mon, 30 May 2011 22:39:48 -0700 (PDT) Message-ID: <4DE47F23.2060401@cs.ucla.edu> Date: Mon, 30 May 2011 22:39:47 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: Kenichi Handa Subject: Re: bug#8751: 24.0.50; CCL is broken References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 8751 Cc: 8751@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) On 05/30/11 22:12, Kenichi Handa wrote: > If the above patch fixes the code to match with the > following revised comment, it is the right patch. Thanks, I put that comment in, as bzr 104445. From unknown Tue Jun 17 20:20:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 28 Jun 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator