From owner-freebsd-hackers Sun Jun 15 09:29:47 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA16198 for hackers-outgoing; Sun, 15 Jun 1997 09:29:47 -0700 (PDT) Received: from pahtoh.cwu.edu (root@pahtoh.cwu.edu [198.104.65.27]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA16193 for ; Sun, 15 Jun 1997 09:29:45 -0700 (PDT) Received: from opus.cts.cwu.edu (skynyrd@opus.cts.cwu.edu [198.104.92.71]) by pahtoh.cwu.edu (8.8.5/8.8.5) with ESMTP id JAA02991; Sun, 15 Jun 1997 09:29:42 -0700 (PDT) Received: from localhost (skynyrd@localhost) by opus.cts.cwu.edu (8.8.5/8.8.5) with SMTP id JAA13612; Sun, 15 Jun 1997 09:29:42 -0700 (PDT) Date: Sun, 15 Jun 1997 09:29:42 -0700 (PDT) From: Chris Timmons To: "Serge A. Babkin" cc: hackers@FreeBSD.ORG Subject: Re: C optimizer bug ? In-Reply-To: <199706142204.EAA24900@hq.icb.chel.su> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hmmm, deja vu all over again? See the post below from Garrett; I also found a post from Thomas David Rivers who mentioned the possibility that automatic variables could have static extent when the code is compiled without optimization. TDR suggested that perhaps the questionable code was saving the address of an auto and then trying to dereference it later. Works fine until you compile with optimization and the variable is actually constructed/destructed as control flows in and out of the block in which it is defined (i.e. local extent.) caveat: I do not know exactly how gcc behaves in this regard; it just seemed like the two threads might be concerned with the same phenomenon. -Chris (from the archives...) Date: Tue, 11 Feb 1997 15:22:52 -0500 From: Garrett Wollman To: guhl@mitre.org (George Uhl) Cc: freebsd-hackers@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG Sender: owner-hackers@FreeBSD.ORG Subject: Fix to Interrupt/Terminate Signal causes page fault in kernel mode < I posted the following to freebsd-hackers and freebsd-bugs a couple > of days ago. I have fixed the problem, not by making any code > changes, but by compiling the kernel unoptimized! Your code is almost certainly broken. It probably has automatic variable initialization problems. -GAWollman