From owner-freebsd-hackers Thu Apr 26 6:53:21 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 3778537B422 for ; Thu, 26 Apr 2001 06:53:17 -0700 (PDT) (envelope-from des@ofug.org) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id PAA56274; Thu, 26 Apr 2001 15:53:10 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Jason Andresen Cc: hackers@freebsd.org Subject: Re: gcc -O bug References: <3AE82644.50ED4A0@mitre.org> From: Dag-Erling Smorgrav Date: 26 Apr 2001 15:53:10 +0200 In-Reply-To: <3AE82644.50ED4A0@mitre.org> Message-ID: Lines: 19 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jason Andresen writes: > Dag-Erling Smorgrav wrote: > > I ran into this bug while analyzing a customer's logs to determine the > > best time of day for an upgrade. The original script was in Perl, but > > I rewrote it in C because it was too slow. The C version produces > > incorrect results when compiled with -O. Note that the log starts at > > 16:27. > Er, isn't this the kind of problem the GCC folks are more likly to be > able to fix? Sure, but I thought people on this list (especially David O'Brien) might have some insights. Anyway, I found the bug - it's not a compiler bug, it's simply a matter of passing a partially uninitialized struct tm to mktime(). DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message