Gnus development mailing list
 help / color / mirror / Atom feed
From: Aidan Kehoe <kehoea@parhasard.net>
To: Reiner Steib <Reiner.Steib@gmx.de>
Cc: xemacs-patches@xemacs.org, ding@gnus.org
Subject: Re: [PATCH] Fix a bug with XEmacs and bignum support.
Date: Sun, 11 Jan 2009 21:57:02 +0000	[thread overview]
Message-ID: <18794.27438.538380.420833@parhasard.net> (raw)
In-Reply-To: <878wphpxuw.fsf@marauder.physik.uni-ulm.de>


 Ar an t-aonú lá déag de mí Eanair, scríobh Reiner Steib: 

 > If you need to make sure that the correct runtime value is used, I
 > don't understand why you hard-code 134217727?  I would have
 > expected...
 > 
 > 	      (minid (or (and (boundp 'most-positive-fixnum)
 > 			      most-positive-fixnum)
 > 			 (lsh -1 -1)))
 > 
 > What am I missing?

Nothing, that’s a perfectly reasonable approach too. 

 > On a 64-bit machine, I get:
 > 
 > ,----[ M-x ielm RET ]
 > | ELISP> (lsh -1 -1)
 > | 576460752303423487
 > | ELISP> (emacs-version)
 > | "GNU Emacs 21.3.1 (x86_64-suse-linux, X toolkit, Xaw3d scroll bars)\n of 2004-1\
 > | 0-05 on prokofjieff"
 > | ELISP> (when (require 'cl) most-positive-fixnum)
 > | 576460752303423487
 > `----
 > 
 > When I used this machine(s) some years ago, I always compiled Gnus,
 > AUCTeX, BBDB, emacs-w3m, etc on a 64-bit machine and ran the compiled
 > Lisp code on both, 64-bit and 32-bit machines
 > (/usr/local/share/emacs/site-lisp shared via NFS).

I don’t know if the bug will actually produce noticeable symptoms in
practice--I was curious where the technique had been used, and I found the
code via this search:
http://www.google.com/codesearch?q=lsh\+-1\+-1+file%3A\.el
I haven’t been bitten by the bug. 

GNU Emacs certainly does silently overflow, though, writing out a 59-bit
number into byte-compiled code can provoke bugs if that code is run on a
machine where a Lisp integer is 28 bits wide. But you won’t get a
wrong-type-argument or anything of the sort, unless the sign is explicitly
checked.

-- 
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?

_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches@xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches

  reply	other threads:[~2009-01-11 21:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <18793.58572.280122.113699@parhasard.net>
2009-01-11 15:20 ` Reiner Steib
2009-01-11 15:55   ` Aidan Kehoe
2009-01-11 17:16     ` Reiner Steib
2009-01-11 21:57       ` Aidan Kehoe [this message]
2009-01-12 22:45       ` Katsumi Yamaoka

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

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

  git send-email \
    --in-reply-to=18794.27438.538380.420833@parhasard.net \
    --to=kehoea@parhasard.net \
    --cc=Reiner.Steib@gmx.de \
    --cc=ding@gnus.org \
    --cc=xemacs-patches@xemacs.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.
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 NNTP newsgroup(s).