bug-gnu-emacs
[Top][All Lists]
Advanced

[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


From: Noam Postavsky
Subject: bug#36740: 27.0.50; apparently buggy code in ccl.c (lookup-integer-constant)
Date: Thu, 01 Aug 2019 13:14:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (windows-nt)

Pip Cet <address@hidden> writes:

> 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.

I don't really see the point in using a fresh symbol here; but if you do
insist on that, let-binding translation-hash-table-vector should stop
the leak, right?

> +(ert-deftest ccl-hash-table ()
> +  (let ((sym (gensym))
> +        (table (make-hash-table :test 'eq)))
> +    (puthash 16 17 table)
> +    (puthash 17 16 table)
> +    (define-translation-hash-table sym table)
> +    (let* ((prog `(2
> +                   ((loop
> +                     (lookup-integer ,sym r0 r1)))))
> +           (compiled (ccl-compile prog))
> +           (registers [17 0 0 0 0 0 0 0]))
> +      (ccl-execute compiled registers)
> +      (should (equal registers [2 16 0 0 0 0 0 1])))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]