Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jun 1997 09:29:42 -0700 (PDT)
From:      Chris Timmons <skynyrd@opus.cts.cwu.edu>
To:        "Serge A. Babkin" <babkin@hq.icb.chel.su>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: C optimizer bug ?
Message-ID:  <Pine.BSF.3.95.970615091428.13521B-100000@opus.cts.cwu.edu>
In-Reply-To: <199706142204.EAA24900@hq.icb.chel.su>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <wollman@lcs.mit.edu>
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

<<On Tue, 11 Feb 1997 14:09:16 -0500, guhl@mitre.org (George Uhl) said:

> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970615091428.13521B-100000>