From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: Emacs current-time-string core dump on 64-bit hosts Date: Fri, 17 Mar 2006 09:04:40 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1142611621 10849 80.91.229.2 (17 Mar 2006 16:07:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Mar 2006 16:07:01 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 17 17:06:59 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FKHTF-0000xG-A2 for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Mar 2006 17:06:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FKHTE-000208-Q5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Mar 2006 11:06:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FKHTC-0001zP-Eq for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2006 11:06:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FKHTA-0001wr-JZ for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2006 11:06:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FKHTA-0001wo-Eo for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2006 11:06:28 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FKHY4-0007tO-Ce for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2006 11:11:32 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FKHSd-0000lI-3r for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2006 17:05:55 +0100 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Mar 2006 17:05:55 +0100 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Mar 2006 17:05:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Lines: 23 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:14960 Archived-At: Eli Zaretskii wrote: >>From: Paul Eggert >>Gcc: nnfolder+archive:outgo >>Date: Thu, 16 Mar 2006 21:58:09 -0800 >> >>2006-03-16 Paul Eggert >> >> Do not use ctime, since it has undefined behavior with >> out-of-range time stamps. This fixes a bug where >> (current-time-string '(2814749767106 0)) would make Emacs dump >> core on 64-bit Solaris 8; the fix is to remove all uses of ctime >> from the Emacs source code. > > > Personally, I find it preposterous that we need to reinvent library > functions. Isn't there a better (safer) library function, or a > combination thereof, that we could use instead of rolling our own? Why not have Emacs test for an out-of-range time stamp before calling ctime? -- Kevin Rodgers