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

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

[debbugs-tracker] bug#32485: closed (27.0.50; Problem with zerop on 32-b


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#32485: closed (27.0.50; Problem with zerop on 32-bit platforms)
Date: Tue, 21 Aug 2018 20:55:02 +0000

Your message dated Tue, 21 Aug 2018 13:54:11 -0700
with message-id <address@hidden>
and subject line Re: bug#32485: 27.0.50; Problem with zerop on 32-bit platforms
has caused the debbugs.gnu.org bug report #32485,
regarding 27.0.50; Problem with zerop on 32-bit platforms
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
32485: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32485
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; Problem with zerop on 32-bit platforms Date: Mon, 20 Aug 2018 14:12:54 -0400 User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
Evaluating (zerop (lsh -1 32)) on 32-bit Cygwin yields

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p -4294967296)

I realize that the fate of lsh is still being debated, but I think
there's a problem with zerop anyway, because directly evaluating (zerop
-4294967296) leads to the same error.

I encountered this problem because vc-hg-state-fast contains the
following:

         ;; We want to store 32-bit unsigned values in fixnums.
         (zerop (lsh -1 32))

Aside from the fact that this leads to an error, it may need to be
changed once a decision is made about lsh.



In GNU Emacs 27.0.50 (build 10, i686-pc-cygwin)
 of 2018-08-20 built on moufang
Repository revision: ecd7a9407711ebe24d7e07d4402a2d66754ee693




--- End Message ---
--- Begin Message --- Subject: Re: bug#32485: 27.0.50; Problem with zerop on 32-bit platforms Date: Tue, 21 Aug 2018 13:54:11 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
vc-hg-state-fast might still need attention. Currently (zerop (lsh -1 32)) returns nil on all platforms, so it's useless; but that might change

This prompted me to audit the uses of lsh in the Emacs source code. I found and fixed a few glitches by installing the attached patch; in particular it fixes vg-hg-state-fast by using ash instead, as ash's semantics are clear and not subject to change. This patch goes further in this direction by replacing lsh with ash when either will do.

As this fixes the remaining problems mentioned in this bug report, I'm boldly closing the report.

Attachment: 0001-Audit-use-of-lsh-and-fix-glitches.patch
Description: Text Data


--- End Message ---

reply via email to

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