GNU bug report logs - #11913
Unusual Emacs 24.1 arithmetic error (abs) on i386 machine

Previous Next

Package: emacs;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Wed, 11 Jul 2012 18:00:02 UTC

Severity: important

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11913 in the body.
You can then email your comments to 11913 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Wed, 11 Jul 2012 18:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rob Browning <rlb <at> defaultvalue.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 11 Jul 2012 18:00:02 GMT) Full text and rfc822 format available.

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

From: Rob Browning <rlb <at> defaultvalue.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Unusual Emacs 24.1 arithmetic error (abs) on i386 machine
Date: Wed, 11 Jul 2012 12:53:41 -0500
At the moment, Emacs 24.1 repeatedly fails to build on a Debian i386
build daemon, murphy, which is an actual i386 machine.  However, the
build finishes without a problem on biber which is an amd64 machine,
building in an i386 chroot.

I was hoping that the error might be familiar to someone; it looks like
this (for both Debian 24.1+1-1 and 24.1+1-2):

  cal-hebrew.el:815:1:Warning: global/dynamic var `entry' lacks a prefix
  cal-hebrew.el:819:56:Error: Arithmetic error: "abs", 8.0
  make[4]: *** [calendar/cal-hebrew.elc] Error 1
  make[4]: *** Waiting for unfinished jobs....

I have attempted to reproduce the problem a number of different ways,
without success:

  - local i386 chroot on another amd64 host
  - local i386 wheezy kvm vm
  - local i386 squeeze kvm vm using a wheezy chroot (more similar to murphy)
  - local i386 host (thanks to Moritz)

I'm also asking about the possibility of shell access to murphy.

You can find the full build log for one of the failures here:

  https://buildd.debian.org/status/fetch.php?pkg=emacs24&arch=i386&ver=24.1%2B1-2&stamp=1341453696

and the overall build summary here:

  https://buildd.debian.org/status/package.php?p=emacs24

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Wed, 11 Jul 2012 19:22:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: 11913 <at> debbugs.gnu.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Wed, 11 Jul 2012 15:16:16 -0400
No help whatsoever, but deja vu in March 2008 on two different
distributions, then apparently never again until now:

http://lists.gnu.org/archive/html/emacs-devel/2008-03/msg00508.html
http://lists.gnu.org/archive/html/emacs-devel/2008-03/msg00769.html




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Wed, 11 Jul 2012 21:59:01 GMT) Full text and rfc822 format available.

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

From: Rob Browning <rlb <at> defaultvalue.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Wed, 11 Jul 2012 16:52:33 -0500
Glenn Morris <rgm <at> gnu.org> writes:

> No help whatsoever, but deja vu in March 2008 on two different
> distributions, then apparently never again until now:
>
> http://lists.gnu.org/archive/html/emacs-devel/2008-03/msg00508.html
> http://lists.gnu.org/archive/html/emacs-devel/2008-03/msg00769.html

OK, thanks -- I'm going to see if I can have access to murphy.  If so,
any suggestions with respect to tracking down the problem?

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 17:53:01 GMT) Full text and rfc822 format available.

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

From: Rob Browning <rlb <at> defaultvalue.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 12:47:08 -0500
Rob Browning <rlb <at> defaultvalue.org> writes:

> OK, thanks -- I'm going to see if I can have access to murphy.  If so,
> any suggestions with respect to tracking down the problem?

So it looks like I won't have direct access to murphy, but I can submit
requests to run tests.  Do you have any thoughts about what might be
most effective?

This was the original error:

  cal-hebrew.el:819:56:Error: Arithmetic error: "abs", 8.0

and I can easily ask them to run a build with an annotated version of
emacs.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 17:58:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: 11913 <at> debbugs.gnu.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 13:51:29 -0400
Rob Browning wrote:

> This was the original error:
>
>   cal-hebrew.el:819:56:Error: Arithmetic error: "abs", 8.0

I'm sorry, personally I have no idea what to do about this.
Hopefully someone else on this list does...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 18:47:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, rlb <at> defaultvalue.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 21:40:18 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Fri, 13 Jul 2012 13:51:29 -0400
> Cc: 11913 <at> debbugs.gnu.org
> 
> Rob Browning wrote:
> 
> > This was the original error:
> >
> >   cal-hebrew.el:819:56:Error: Arithmetic error: "abs", 8.0
> 
> I'm sorry, personally I have no idea what to do about this.
> Hopefully someone else on this list does...

Do we even understand how this error happens?  There's nothing even
close to a reference to 'abs' on that line of cal-hebrew.el in my copy
of Emacs 24.1.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:08:01 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, Glenn Morris <rgm <at> gnu.org>, rlb <at> defaultvalue.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 21:02:06 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Glenn Morris <rgm <at> gnu.org>
>> Date: Fri, 13 Jul 2012 13:51:29 -0400
>> Cc: 11913 <at> debbugs.gnu.org
>> 
>> Rob Browning wrote:
>> 
>> > This was the original error:
>> >
>> >   cal-hebrew.el:819:56:Error: Arithmetic error: "abs", 8.0
>> 
>> I'm sorry, personally I have no idea what to do about this.
>> Hopefully someone else on this list does...
>
> Do we even understand how this error happens?  There's nothing even
> close to a reference to 'abs' on that line of cal-hebrew.el in my copy
> of Emacs 24.1.

Let alone why should (abs 8.0) raise an arithmetic error.  That looks
much like a bug in the system library.  It would be nice to know the
actual errno value.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:09:02 GMT) Full text and rfc822 format available.

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

From: Rob Browning <rlb <at> defaultvalue.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 14:02:16 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

> Do we even understand how this error happens?  There's nothing even
> close to a reference to 'abs' on that line of cal-hebrew.el in my copy
> of Emacs 24.1.

Right.  While I'm not extremely knowledgeable about the process, since
that string is associated with Qarith_error (in data.c), I assumed it
was probably some code deeper down raising the exception (from either
data.c or floatfns.c).  Given the fact that it only happens on i386, I
also wondered if x87 issues might be involved -- but the fact that it
only happens on *this* i386 machine (and a couple of others) suggests
the software versions matter.

In any case, if we can come up with some suitable diagnostic process, I
can ask the buildd maintainers to attempt it, but since I'm sure there
time is a limited resource, I wanted to consult all of you in an attempt
to test more efficiently.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:11:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, rlb <at> defaultvalue.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 15:04:25 -0400
Eli Zaretskii wrote:

>> >   cal-hebrew.el:819:56:Error: Arithmetic error: "abs", 8.0
[...]
> Do we even understand how this error happens?  There's nothing even
> close to a reference to 'abs' on that line of cal-hebrew.el in my copy
> of Emacs 24.1.

Line 819 of cal-hebrew.el in Emacs 24 is diary-hebrew-birthday.
This calls calendar-absolute-from-gregorian, which uses the `abs'
function. I assume it's something to do with that, but I have no idea
why that function should even be called during the building of Emacs.

There are few calendar callers of the `abs' function.
Another is calendar-dst-find-data. This is actually called when cal-dst
is loaded, so an error from there during building would make slightly
more sense.

But why does (abs 8.0) return an arithmetic error at all...?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:22:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, rlb <at> defaultvalue.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 22:15:34 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: rlb <at> defaultvalue.org,  11913 <at> debbugs.gnu.org
> Date: Fri, 13 Jul 2012 15:04:25 -0400
> 
> Eli Zaretskii wrote:
> 
> >> >   cal-hebrew.el:819:56:Error: Arithmetic error: "abs", 8.0
> [...]
> > Do we even understand how this error happens?  There's nothing even
> > close to a reference to 'abs' on that line of cal-hebrew.el in my copy
> > of Emacs 24.1.
> 
> Line 819 of cal-hebrew.el in Emacs 24 is diary-hebrew-birthday.
> This calls calendar-absolute-from-gregorian, which uses the `abs'
> function.

No, line 819 is this:

  (defun diary-hebrew-birthday (month day year &optional after-sunset)

This doesn't call anything.  So this is still mystery in my eyes.

Btw, column 56, assuming it is 1-based, is 'a' in after-sunset.  Huh??

> But why does (abs 8.0) return an arithmetic error at all...?

Hardware problem or some kernel issue are the only things that come to
mind.  Running under a debugger should bring more info.

And I still don't see how 'abs' could be called from that line and
that column.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:24:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: 11913 <at> debbugs.gnu.org, rgm <at> gnu.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 22:17:39 +0300
> From: Rob Browning <rlb <at> defaultvalue.org>
> Cc: Glenn Morris <rgm <at> gnu.org>,  11913 <at> debbugs.gnu.org
> Date: Fri, 13 Jul 2012 14:02:16 -0500
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Do we even understand how this error happens?  There's nothing even
> > close to a reference to 'abs' on that line of cal-hebrew.el in my copy
> > of Emacs 24.1.
> 
> Right.  While I'm not extremely knowledgeable about the process, since
> that string is associated with Qarith_error (in data.c), I assumed it
> was probably some code deeper down raising the exception (from either
> data.c or floatfns.c).  Given the fact that it only happens on i386, I
> also wondered if x87 issues might be involved -- but the fact that it
> only happens on *this* i386 machine (and a couple of others) suggests
> the software versions matter.

Does that 386 machine have an x87 co-processor?  If not, what provides
the floating-point emulation -- the kernel?

If you compile a trivial C program that calls 'fabs' on that machine,
does it work as expected, or does it bomb?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:26:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, rlb <at> defaultvalue.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 15:19:58 -0400
Eli Zaretskii wrote:

> No, line 819 is this:
>
>   (defun diary-hebrew-birthday (month day year &optional after-sunset)

I put less trust in the precise line number reported by the Emacs byte
compiler. :)
(I don't think debugging the Lisp level is likely to be useful anyway.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:36:01 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, Rob Browning <rlb <at> defaultvalue.org>
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 21:29:52 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> If you compile a trivial C program that calls 'fabs' on that machine,
> does it work as expected, or does it bomb?

It will not bomb, it will just set errno spuriously.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:42:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 11913 <at> debbugs.gnu.org, rlb <at> defaultvalue.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 22:35:54 +0300
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Cc: Rob Browning <rlb <at> defaultvalue.org>,  11913 <at> debbugs.gnu.org
> Date: Fri, 13 Jul 2012 21:29:52 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > If you compile a trivial C program that calls 'fabs' on that machine,
> > does it work as expected, or does it bomb?
> 
> It will not bomb, it will just set errno spuriously.

Doesn't it trigger SIGILL or SIGFPE?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:43:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, rlb <at> defaultvalue.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 22:37:18 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: rlb <at> defaultvalue.org,  11913 <at> debbugs.gnu.org
> Date: Fri, 13 Jul 2012 15:19:58 -0400
> 
> Eli Zaretskii wrote:
> 
> > No, line 819 is this:
> >
> >   (defun diary-hebrew-birthday (month day year &optional after-sunset)
> 
> I put less trust in the precise line number reported by the Emacs byte
> compiler. :)

This is a slippery slope: if we don't trust that (in a released
version!), then why do we trust the rest of that error message?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:54:01 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, Glenn Morris <rgm <at> gnu.org>, rlb <at> defaultvalue.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 21:47:35 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> This is a slippery slope: if we don't trust that (in a released
> version!), then why do we trust the rest of that error message?

Because line numbers are much harder to get right.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:57:02 GMT) Full text and rfc822 format available.

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

From: Rob Browning <rlb <at> defaultvalue.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, rgm <at> gnu.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 14:50:38 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

> Does that 386 machine have an x87 co-processor?  If not, what provides
> the floating-point emulation -- the kernel?

It's a P4 Xeon, so it should have x87 support:

  http://db.debian.org/machines.cgi?host=murphy

> If you compile a trivial C program that calls 'fabs' on that machine,
> does it work as expected, or does it bomb?

For reference, I'd be a bit surprised if there was a really blatant
problem with murphy since that buildd is probably used to build a lot of
other Debian packages.  Though probably not as many as other buildds,
since until recently most developers probably uploaded i386 binaries
themselves.

That said, I'm happy to ask the maintainers to attempt whatever seems
most appropriate.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Fri, 13 Jul 2012 19:58:02 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, rlb <at> defaultvalue.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Fri, 13 Jul 2012 21:51:24 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Doesn't it trigger SIGILL or SIGFPE?

That wouldn't tell us about abs and 8.0.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Sat, 14 Jul 2012 06:28:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: 11913 <at> debbugs.gnu.org, rgm <at> gnu.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Sat, 14 Jul 2012 09:21:35 +0300
> From: Rob Browning <rlb <at> defaultvalue.org>
> Cc: rgm <at> gnu.org,  11913 <at> debbugs.gnu.org
> Date: Fri, 13 Jul 2012 14:50:38 -0500
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Does that 386 machine have an x87 co-processor?  If not, what provides
> > the floating-point emulation -- the kernel?
> 
> It's a P4 Xeon, so it should have x87 support:

Yes, of course.  You said "386", so I somehow thought it was a _real_
i386.

Then I think the only thing that will help is run this under a
debugger.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Sat, 14 Jul 2012 06:31:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 11913 <at> debbugs.gnu.org, rlb <at> defaultvalue.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Sat, 14 Jul 2012 09:23:53 +0300
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Cc: rlb <at> defaultvalue.org,  11913 <at> debbugs.gnu.org
> Date: Fri, 13 Jul 2012 21:51:24 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Doesn't it trigger SIGILL or SIGFPE?
> 
> That wouldn't tell us about abs and 8.0.

Right, but it should cause the program to crash.

However, since the CPU is a P4, I don't think my suggestion is a good
idea.  There cannot be any hardware problem with FP instructions on a
P4.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Sat, 14 Jul 2012 08:16:01 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, rlb <at> defaultvalue.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Sat, 14 Jul 2012 10:09:47 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Andreas Schwab <schwab <at> linux-m68k.org>
>> Cc: rlb <at> defaultvalue.org,  11913 <at> debbugs.gnu.org
>> Date: Fri, 13 Jul 2012 21:51:24 +0200
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> > Doesn't it trigger SIGILL or SIGFPE?
>> 
>> That wouldn't tell us about abs and 8.0.
>
> Right, but it should cause the program to crash.

But it won't happen.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Sat, 14 Jul 2012 21:52:02 GMT) Full text and rfc822 format available.

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

From: Rob Browning <rlb <at> defaultvalue.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Sat, 14 Jul 2012 16:45:33 -0500
Glenn Morris <rgm <at> gnu.org> writes:

> But why does (abs 8.0) return an arithmetic error at all...?

OK, at the moment, I believe the short answer is because fabs() is
changing errno which triggers the default clause in IN_FLOAT() here:

    default: arith_error (float_error_fn_name, float_error_arg);

I've been told that this should be considered an Emacs bug because the
effect of fabs() on errno is strictly undefined, and so fabs() is within
its rights to do whatever it wants to the value.

Hope this helps.
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11913; Package emacs. (Tue, 17 Jul 2012 02:40:01 GMT) Full text and rfc822 format available.

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

From: Rob Browning <rlb <at> defaultvalue.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 11913 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Mon, 16 Jul 2012 21:33:58 -0500
Rob Browning <rlb <at> defaultvalue.org> writes:

> Glenn Morris <rgm <at> gnu.org> writes:
>
>> But why does (abs 8.0) return an arithmetic error at all...?
>
> OK, at the moment, I believe the short answer is because fabs() is
> changing errno which triggers the default clause in IN_FLOAT() here:
>
>     default: arith_error (float_error_fn_name, float_error_arg);
>
> I've been told that this should be considered an Emacs bug because the
> effect of fabs() on errno is strictly undefined, and so fabs() is within
> its rights to do whatever it wants to the value.

For now, I'm going to deploy a patch in the Debian package that just
adds a DEB_IN_FLOAT_NOERRNO() that omits the errno checking, and then
uses that macro for the fabs() call.

Doing something with a similar result would probably be advisable.

Thanks for the help.
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Tue, 17 Jul 2012 03:06:02 GMT) Full text and rfc822 format available.

Notification sent to Rob Browning <rlb <at> defaultvalue.org>:
bug acknowledged by developer. (Tue, 17 Jul 2012 03:06:05 GMT) Full text and rfc822 format available.

Message #76 received at 11913-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Rob Browning <rlb <at> defaultvalue.org>, 11913-done <at> debbugs.gnu.org
Subject: Re: bug#11913: Unusual Emacs 24.1 arithmetic error (abs) on i386
	machine
Date: Mon, 16 Jul 2012 19:59:10 -0700
Thanks for that bug report.  It's definitely an Emacs bug.
I applied the obvious fix as trunk bzr 109108
and am marking this as done.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 14 Aug 2012 11:24:02 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 278 days ago.

Previous Next


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