From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 11825@debbugs.gnu.org, schwab@linux-m68k.org
Subject: bug#11825: 24.1.50; float-time no longer accepts negative time values
Date: Sun, 08 Jul 2012 20:33:46 -0700 [thread overview]
Message-ID: <4FFA511A.1020804@cs.ucla.edu> (raw)
In-Reply-To: <83fw91lk16.fsf@gnu.org>
On 07/08/2012 07:56 PM, Eli Zaretskii wrote:
> since time-subtract is called by timers, it is very
> easy to get into a situation where EMACS_SUB_TIME etc. are used with
> second argument not an offset, but an absolute time.
Yes, one must be careful in C code. Currently, Emacs always
makes sure that EMACS_TIME_LE (A, B) before invoking
EMACS_SUB_TIME (..., B, A), with the exception of the
special case in msdos.c that I was suggesting to change
to be like the rest of Emacs for ease of maintenance.
But again, it's no big deal -- the code works fine as-is,
including the msdos.c special-case.
For Lisp code the bugs are different. Lisp code cannot
invoke EMACS_SUB_TIME directly, and all execution paths
that go through EMACS_SUB_TIME are checked as described
above. The time-subtract function is indeed buggy with
some (unlikely) arguments, but these bugs are entirely due
to Emacs fixnum overflow and are independent of EMACS_SUB_TIME
and of the C representation of time_t.
next prev parent reply other threads:[~2012-07-09 3:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-30 16:08 bug#11825: 24.1.50; float-time no longer accepts negative time values Eli Zaretskii
2012-07-03 22:56 ` Glenn Morris
2012-07-07 2:11 ` Paul Eggert
2012-07-07 6:57 ` Eli Zaretskii
2012-07-07 20:30 ` Paul Eggert
2012-07-08 2:57 ` Eli Zaretskii
2012-07-08 7:26 ` Paul Eggert
2012-07-08 9:00 ` Andreas Schwab
2012-07-08 23:03 ` Paul Eggert
2012-07-08 23:37 ` Juanma Barranquero
2012-07-09 0:21 ` Paul Eggert
2012-07-09 0:57 ` Juanma Barranquero
2012-07-09 2:56 ` Eli Zaretskii
2012-07-09 3:33 ` Paul Eggert [this message]
2012-07-08 15:32 ` Eli Zaretskii
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=4FFA511A.1020804@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=11825@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=schwab@linux-m68k.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).