From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#11825: 24.1.50; float-time no longer accepts negative time values Date: Sun, 08 Jul 2012 20:33:46 -0700 Organization: UCLA Computer Science Department Message-ID: <4FFA511A.1020804@cs.ucla.edu> References: <4FF79ADD.8080601@cs.ucla.edu> <83r4so12ja.fsf@gnu.org> <4FF89C4C.6060503@cs.ucla.edu> <83wr2fklhs.fsf@gnu.org> <4FF93637.6060304@cs.ucla.edu> <4FFA11CB.8000502@cs.ucla.edu> <83fw91lk16.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1341804837 13713 80.91.229.3 (9 Jul 2012 03:33:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2012 03:33:57 +0000 (UTC) Cc: 11825@debbugs.gnu.org, schwab@linux-m68k.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 09 05:33:56 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1So4jU-0000A4-15 for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jul 2012 05:33:56 +0200 Original-Received: from localhost ([::1]:46654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1So4jS-0001HW-Vz for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jul 2012 23:33:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1So4jP-0001HG-Tc for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:33:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1So4jO-0003IO-4t for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:33:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1So4jO-0003IK-1V for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:33:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1So4oQ-0003FY-0r for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 23:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Jul 2012 03:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11825 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11825-submit@debbugs.gnu.org id=B11825.134180513112476 (code B ref 11825); Mon, 09 Jul 2012 03:39:01 +0000 Original-Received: (at 11825) by debbugs.gnu.org; 9 Jul 2012 03:38:51 +0000 Original-Received: from localhost ([127.0.0.1]:57202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1So4oF-0003FA-Ht for submit@debbugs.gnu.org; Sun, 08 Jul 2012 23:38:51 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:37334) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1So4oD-0003F3-TC for 11825@debbugs.gnu.org; Sun, 08 Jul 2012 23:38:50 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 5853039E800D; Sun, 8 Jul 2012 20:33:36 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FH5qA0vyIxOF; Sun, 8 Jul 2012 20:33:35 -0700 (PDT) Original-Received: from [192.168.1.4] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id B410939E8007; Sun, 8 Jul 2012 20:33:35 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 In-Reply-To: <83fw91lk16.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61741 Archived-At: 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.