GNU bug report logs - #36740
27.0.50; apparently buggy code in ccl.c (lookup-integer-constant)

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> gmail.com>

Date: Sat, 20 Jul 2019 12:31:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 27.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pip Cet <pipcet <at> gmail.com>
To: Andy Moreton <andrewjmoreton <at> gmail.com>
Cc: 36740 <at> debbugs.gnu.org
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 part 1 (text/plain, inline)]
On Sat, Jul 20, 2019 at 10:49 PM Andy Moreton <andrewjmoreton <at> gmail.com> 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.
[0001-Fix-return-value-for-CCL-opcode-lookup-integer.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 275 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.