GNU bug report logs - #32477
27.0.50; `=` burps on bignums when compiled

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Date: Sun, 19 Aug 2018 23:16:02 UTC

Severity: normal

Merged with 32486

Found in version 27.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andy Moreton <andrewjmoreton <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#32477: 27.0.50; `=` burps on bignums when compiled
Date: Mon, 20 Aug 2018 02:37:13 +0100
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;





This bug report was last modified 6 years and 357 days ago.

Previous Next


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