unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: 32477@debbugs.gnu.org
Subject: bug#32477: 27.0.50; `=` burps on bignums when compiled
Date: Mon, 20 Aug 2018 02:37:13 +0100	[thread overview]
Message-ID: <86o9dxg6nq.fsf@gmail.com> (raw)
In-Reply-To: <jwvlg92c5jq.fsf@iro.umontreal.ca>

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	other threads:[~2018-08-20  1:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-19 23:14 bug#32477: 27.0.50; `=` burps on bignums when compiled Stefan Monnier
2018-08-20  1:37 ` Andy Moreton [this message]
2018-08-20 20:44   ` Pip Cet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86o9dxg6nq.fsf@gmail.com \
    --to=andrewjmoreton@gmail.com \
    --cc=32477@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).