From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#36740: 27.0.50; apparently buggy code in ccl.c (lookup-integer-constant) Date: Sat, 20 Jul 2019 23:48:30 +0100 Message-ID: <86o91oxqyp.fsf@gmail.com> References: <838sssu9rr.fsf@gnu.org> <834l3gu845.fsf@gnu.org> <86tvbgfs6g.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="10125"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) To: 36740@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 21 00:49:08 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hoyA7-0002X0-MG for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Jul 2019 00:49:07 +0200 Original-Received: from localhost ([::1]:53856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoyA6-0003Ap-EL for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jul 2019 18:49:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51895) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoyA3-0003AV-Gv for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 18:49:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hoyA2-0002Uh-La for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 18:49:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49165) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hoyA2-0002UO-Gb for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 18:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hoyA2-0007nq-Dh for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 18:49:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Jul 2019 22:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36740 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156366292629965 (code B ref -1); Sat, 20 Jul 2019 22:49:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jul 2019 22:48:46 +0000 Original-Received: from localhost ([127.0.0.1]:57986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hoy9l-0007nF-RY for submit@debbugs.gnu.org; Sat, 20 Jul 2019 18:48:46 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:38343) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hoy9k-0007n8-KO for submit@debbugs.gnu.org; Sat, 20 Jul 2019 18:48:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51821) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoy9j-0003AF-Io for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 18:48:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hoy9i-00029H-KT for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 18:48:43 -0400 Original-Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:33074 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hoy9i-00027F-Dc for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 18:48:42 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hoy9e-00023w-OT for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2019 00:48:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:GKztxVTohg+R7EbSgmlF68VPtP8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:163494 Archived-At: On Sat 20 Jul 2019, Pip Cet wrote: > On Sat, Jul 20, 2019 at 7:00 PM Andy Moreton wrote: >> > Patch attached. It'd be nice to have tests for this, of course, but >> > it'd be easier for someone who understands CCL to do... >> >> Are the tests in test/lisp/international/ccl-tests.el sufficient ? If >> not, please etend them to cover this case. > > I'm trying, but it seems like the CCL code is somewhat broken: > `ccl-embed-symbol', as it is now, can never succeed, because it passes > a cons cell rather than a fixnum to (ultimately) logand. Agreed - probably my fault when fixing this code up to prepare for bignum support. > (defun ccl-fixnum (code) > "Convert a CCL code word to a fixnum value." > - (- (logxor (logand code #x0fffffff) #x08000000) #x08000000)) > + (if (integerp code) > + (- (logxor (logand code #x0fffffff) #x08000000) #x08000000) > + code)) `ccl-fixnum' should only receive integer arguments, so perhaps this fix should go in the call in `ccl-embed-data' instead: (aset ccl-program-vector ccl-current-ic (if (numberp data) (ccl-fixnum data) data)) Thanks, AndyM