From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#36740: 27.0.50; apparently buggy code in ccl.c (lookup-integer-constant) Date: Sun, 21 Jul 2019 06:01:10 +0000 Message-ID: References: <838sssu9rr.fsf@gnu.org> <834l3gu845.fsf@gnu.org> <86tvbgfs6g.fsf@gmail.com> <86o91oxqyp.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000ceb3bf058e2ab1df" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="15277"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36740@debbugs.gnu.org To: Andy Moreton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 21 08:02:09 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 1hp4vB-0003ti-Oq for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Jul 2019 08:02:09 +0200 Original-Received: from localhost ([::1]:54734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hp4vA-00011q-Cl for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Jul 2019 02:02:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51483) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hp4v7-00011W-Ra for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2019 02:02:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hp4v6-0007Qe-P1 for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2019 02:02:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49255) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hp4v3-0007Pt-TW for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2019 02:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hp4v3-0003X2-OY for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2019 02:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jul 2019 06:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36740 X-GNU-PR-Package: emacs Original-Received: via spool by 36740-submit@debbugs.gnu.org id=B36740.156368891313562 (code B ref 36740); Sun, 21 Jul 2019 06:02:01 +0000 Original-Received: (at 36740) by debbugs.gnu.org; 21 Jul 2019 06:01:53 +0000 Original-Received: from localhost ([127.0.0.1]:58076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hp4uv-0003Wg-Cy for submit@debbugs.gnu.org; Sun, 21 Jul 2019 02:01:53 -0400 Original-Received: from mail-ot1-f44.google.com ([209.85.210.44]:33538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hp4uu-0003WS-0u for 36740@debbugs.gnu.org; Sun, 21 Jul 2019 02:01:52 -0400 Original-Received: by mail-ot1-f44.google.com with SMTP id q20so36890691otl.0 for <36740@debbugs.gnu.org>; Sat, 20 Jul 2019 23:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TCKwNMd5VagGSVc9y7HUt9iX/P/iOwXnWUluUKAeJZA=; b=ERrcyslGiwc6U4OP/TLmVSf4Sidf4XeTxd6X/Lz1HzV+Uc54uU++IxPkt2CwQ+O/WP IKp87Od739f6VYSbAGoQXy32Rnz/9D9Htdh1Kaddmjw3KJ5yIuLYn+2ZO0o+eXmIcIjv HO891qKS9hXZDYzFRit0xaySC0J18pcOD1MPYrsL+x5tsOgrvijpC8Vgv8VO3O+3u0Js JjxOfRmQFKG4jOzkfGNMkRXpb7BC1x/ZuEJtqoU9HVIJEc1WpI0R1JijHKUc9qtLX2h3 DtOZrWL005S28djPmzNRV9CvswwlEFlXnTBJ3CBalaN5L9lDHdHN5bLhVjR69XCjEB3M HJcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TCKwNMd5VagGSVc9y7HUt9iX/P/iOwXnWUluUKAeJZA=; b=rSMSn/LPXsIVa3SBcLKnYy77G/1XxcQcvATookFrY25F/+zaZ6giQNBf15zT2oyXYL 7UHHZ6kUmlWNO/+uaxb0sYdcfuNxZ2EXecMA8PYc7LWokPVs6hof8z6HSVwXU9qSWhQ9 FYL4Eo/wbdEWLk/mfaiAgcX8m9C4br7f7DXn+WK35u16rNAljpCi3zUxhHG+cc5oxDIc xBH/rLMrzGWdJm/eH9WKIsHYTIsvuTIZ0+wBT5kfjPH12S7IjbMlNU9uhOMOonxZx/1o wLUMX/N48g9DKJVe+c7sI4nKTQwUr8JCUADNTC+oj4CWJ57l30Y5Og9IcAz1FfO+x0fb wXOg== X-Gm-Message-State: APjAAAXyJNZ7G48llUVpqAKU9q2FU4JYEUNbE6fYEhJLxFqXACFuPzpE 34innHbDtYU01tNqbLuGP3k4T9kKDBDxTTw8p6c= X-Google-Smtp-Source: APXvYqzu7BtnBXdzueBSchIpL8lY6tJtxC7KBwFvkcjk6XtaoXjuuRdSKfXDylbjwa5EMieXaJdnnWfp3ScFkcGxUv8= X-Received: by 2002:a9d:744f:: with SMTP id p15mr24200339otk.287.1563688906430; Sat, 20 Jul 2019 23:01:46 -0700 (PDT) In-Reply-To: <86o91oxqyp.fsf@gmail.com> 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:163503 Archived-At: --000000000000ceb3bf058e2ab1df Content-Type: text/plain; charset="UTF-8" On Sat, Jul 20, 2019 at 10:49 PM Andy Moreton wrote: > > (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)) Agreed, revised patch attached. Note that the test leaks entries in translation-hash-table-vector, but I think it's cleaner to start with a new symbol each time we run the test. --000000000000ceb3bf058e2ab1df Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Fix-return-value-for-CCL-opcode-lookup-integer.patch" Content-Disposition: attachment; filename="0001-Fix-return-value-for-CCL-opcode-lookup-integer.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jycjyzjb0 RnJvbSA5MTM4M2Q2YWExOTAwYzQyNmIwYzg3NmUyZmVlZjA0MjY5YzJmZDE1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBTdW4s IDIxIEp1bCAyMDE5IDA1OjU0O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sIGVtYmVkIERBVEEgYXQgSUMuIgogICAoaWYg aWMKLSAgICAgIChhc2V0IGNjbC1wcm9ncmFtLXZlY3RvciBpYyAoY2NsLWZpeG51bSBkYXRhKSkK KyAgICAgIChhc2V0IGNjbC1wcm9ncmFtLXZlY3RvciBpYyAoaWYgKG51bWJlcnAgZGF0YSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNjbC1maXhudW0gZGF0YSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEpKQogICAgIChsZXQgKChsZW4g KGxlbmd0aCBjY2wtcHJvZ3JhbS12ZWN0b3IpKSkKICAgICAgIChpZiAoPj0gY2NsLWN1cnJlbnQt aWMgbGVuKQogCSAgKGxldCAoKG5ldyAobWFrZS12ZWN0b3IgKCogbGVuIDIpIG5pbCkpKQpAQCAt MjA0LDcgKzIwNiw5IEBAIGNjbC1lbWJlZC1kYXRhCiAJICAgICAgKHNldHEgbGVuICgxLSBsZW4p KQogCSAgICAgIChhc2V0IG5ldyBsZW4gKGFyZWYgY2NsLXByb2dyYW0tdmVjdG9yIGxlbikpKQog CSAgICAoc2V0cSBjY2wtcHJvZ3JhbS12ZWN0b3IgbmV3KSkpKQotICAgIChhc2V0IGNjbC1wcm9n cmFtLXZlY3RvciBjY2wtY3VycmVudC1pYyAoY2NsLWZpeG51bSBkYXRhKSkKKyAgICAoYXNldCBj Y2wtcHJvZ3JhbS12ZWN0b3IgY2NsLWN1cnJlbnQtaWMgKGlmIChudW1iZXJwIGRhdGEpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY2NsLWZpeG51bSBk YXRhKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEp KQogICAgIChzZXRxIGNjbC1jdXJyZW50LWljICgxKyBjY2wtY3VycmVudC1pYykpKSkKIAogKGRl ZnVuIGNjbC1lbWJlZC1zeW1ib2wg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