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: Sat, 20 Jul 2019 12:29:57 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="258273"; mail-complaints-to="usenet@blaine.gmane.org" To: 36740@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 20 14:31: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 1hooW4-00155K-C3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jul 2019 14:31:08 +0200 Original-Received: from localhost ([::1]:50996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hooW2-0006In-NW for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jul 2019 08:31:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33106) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hooVz-0006Ih-Ql for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 08:31:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hooVy-00028s-RW for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 08:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48086) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hooVy-00028k-OB for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 08:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hooVy-0001n4-If for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 08:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Jul 2019 12:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 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.15636258406849 (code B ref -1); Sat, 20 Jul 2019 12:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jul 2019 12:30:40 +0000 Original-Received: from localhost ([127.0.0.1]:56907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hooVb-0001mP-Qp for submit@debbugs.gnu.org; Sat, 20 Jul 2019 08:30:40 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:54322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hooVZ-0001mF-81 for submit@debbugs.gnu.org; Sat, 20 Jul 2019 08:30:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33009) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hooVY-0006BA-BW for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 08:30:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hooVX-0001vw-Hg for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 08:30:36 -0400 Original-Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]:41177) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hooVX-0001up-CA for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2019 08:30:35 -0400 Original-Received: by mail-ot1-x32c.google.com with SMTP id o101so35547963ota.8 for ; Sat, 20 Jul 2019 05:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ougrvqwPYWk3F9LbdMKGZvDy2KWdkpysnZxNRpZsGcc=; b=iqqkYjXt+M7zi3bZuwM3d6DuG+S7Ky5COlknk4d+OjHFT1AAR/XayEKIx6rlSpq7vw +Nak6YHVRLp6Eahng2ks4+1VQ5FSIsmsSkzSshbYoAKZ+MybiEyRnyZXDGESvg4HMUeK EZDf/ZJTGdQ6yaLBDCCk8tNxmf+yAMCg82tOIruv8e94SIXYa8VeVmbJUEr+dN+fNIJO M38EFs8+Mj7+FD+y2540EEYirODTYV4u1RYmKOGwoQ7rSummpSBq/c9UGjWRLgkK5U3C GYrAJxPuETOAC26n2uoqEr3pQQgMcKefWtToF0nbMzE0r0/Cbn+E8/iF3NlKCeQ8PutG YrGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ougrvqwPYWk3F9LbdMKGZvDy2KWdkpysnZxNRpZsGcc=; b=jtlDqPWY+kHmke5VeXWGNrLDdQ4pV6X9N3hXX/OiU5EHrW1nV4jdCVPz4FwDUyOt0M YL6LNi+jLOnRmaulLYex2D0ZRJkRXXq/pDreTq/AFRzurYGIwXP5fDs6EExaMLa15JnA pnRtE2gR/prHHWMtdaXxXPhSa9ilmS1GsV7AUh4JvfyMi7iVyFXQqrLVeSYRx3pg51af hPb8ZqaZo9Ahjz+/GWKqwWEeSzYbGR7HkoJU9vU2cNA0u5fuBLVR0TUn5U5ILBFzuq7I 1DRysFI71PeHJ63TjB2oVfblVdVvBaSc3sL+mQ45KO8Dqu7srFaRFZBTu/oPMC19weT9 I9vQ== X-Gm-Message-State: APjAAAXvQ0qyJvhcd2qFAH7cm81mpNPzANStLY2duYXC8gyLkmnIS+9u qo45QFUmLeTzcW5rSO84BzeidKoQ8uwYL+tVNBgVgxb9 X-Google-Smtp-Source: APXvYqw2tG8Fjlh0upZ2FmnbqMxCZPDJJE8/lKrzZy1BnRju0KE5oH7YADP5zwZz2DY8YNojmsR1sDLkjb+CAsit9vU= X-Received: by 2002:a9d:6014:: with SMTP id h20mr10071920otj.210.1563625833942; Sat, 20 Jul 2019 05:30:33 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:163459 Archived-At: This code in ccl.c eop = hash_lookup (h, make_fixnum (reg[RRR]), NULL); if (eop >= 0) { Lisp_Object opl; opl = HASH_VALUE (h, eop); if (! (IN_INT_RANGE (eop) && CHARACTERP (opl))) CCL_INVALID_CMD; reg[RRR] = charset_unicode; reg[rrr] = eop; reg[7] = 1; /* r7 true for success */ } else reg[7] = 0; seems wrong to me. We look up the hash value for reg[RRR], but then we store the hash _index_ into reg[rrr], and throw away the actual value. The bug appears to be present in: commit d325055a00e658a38c1721fcc63ed1775dd8ccb3 Author: Dave Love Date: Tue Jul 30 11:31:54 2002 +0000 which added the code, so I'm not sure whether there's external code which might rely on the buggy behavior (unlikely, I think). Is there any code actually making use of this CCL feature? I'm playing around with hash tables and it would help to resolve this first.