[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36740: 27.0.50; apparently buggy code in ccl.c (lookup-integer-const
bug#36740: 27.0.50; apparently buggy code in ccl.c (lookup-integer-constant)
Sat, 20 Jul 2019 23:48:30 +0100
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)
On Sat 20 Jul 2019, Pip Cet wrote:
> On Sat, Jul 20, 2019 at 7:00 PM Andy Moreton <address@hidden> 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
> (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))