[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11825: 24.1.50; float-time no longer accepts negative time values
From: |
Paul Eggert |
Subject: |
bug#11825: 24.1.50; float-time no longer accepts negative time values |
Date: |
Sun, 08 Jul 2012 20:33:46 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
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.
- bug#11825: 24.1.50; float-time no longer accepts negative time values, (continued)
- bug#11825: 24.1.50; float-time no longer accepts negative time values, Eli Zaretskii, 2012/07/07
- bug#11825: 24.1.50; float-time no longer accepts negative time values, Paul Eggert, 2012/07/07
- bug#11825: 24.1.50; float-time no longer accepts negative time values, Eli Zaretskii, 2012/07/07
- bug#11825: 24.1.50; float-time no longer accepts negative time values, Paul Eggert, 2012/07/08
- bug#11825: 24.1.50; float-time no longer accepts negative time values, Andreas Schwab, 2012/07/08
- bug#11825: 24.1.50; float-time no longer accepts negative time values, Paul Eggert, 2012/07/08
- bug#11825: 24.1.50; float-time no longer accepts negative time values, Juanma Barranquero, 2012/07/08
- bug#11825: 24.1.50; float-time no longer accepts negative time values, Paul Eggert, 2012/07/08
- bug#11825: 24.1.50; float-time no longer accepts negative time values, Juanma Barranquero, 2012/07/08
- bug#11825: 24.1.50; float-time no longer accepts negative time values, Eli Zaretskii, 2012/07/08
- bug#11825: 24.1.50; float-time no longer accepts negative time values,
Paul Eggert <=
- bug#11825: 24.1.50; float-time no longer accepts negative time values, Eli Zaretskii, 2012/07/08