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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32477: 27.0.50; `=` burps on bignums when compiled


From: Andy Moreton
Subject: bug#32477: 27.0.50; `=` burps on bignums when compiled
Date: Mon, 20 Aug 2018 02:37:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (windows-nt)

On Sun 19 Aug 2018, Stefan Monnier wrote:

> Package: Emacs
> Version: 27.0.50
>
> If you try
>
>     M-: (funcall (lambda (x) (= x x)) (expt 2 64)) RET
>
> you'll unsurprisingly get t as result.  Yay!  But if you try
>
>     M-: (funcall (byte-compile '(lambda (x) (= x x))) (expt 2 64)) RET
>
> you should be prompted with an error stating that this largish number is
> not a number-or-marker.  This error occurs for example when loading
> elpa/packages/xelb/xcb-types.elc.

I can reproduce this on a 64bit build on Windows. The following lightly
tested patch appears to work:

diff --git a/src/bytecode.c b/src/bytecode.c
index b27fa7c5c6..155f714a56 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -990,8 +990,8 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, 
Lisp_Object maxdepth,
              TOP = arithcompare (v1, v2, ARITH_EQUAL);
            else
              {
-               CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (v1);
-               CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (v2);
+               CHECK_INTEGER_COERCE_MARKER (v1);
+               CHECK_INTEGER_COERCE_MARKER (v2);
                TOP = EQ (v1, v2) ? Qt : Qnil;
              }
            NEXT;






reply via email to

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