From owner-freebsd-questions@FreeBSD.ORG Sun Mar 21 21:55:06 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E0EA16A4CE for ; Sun, 21 Mar 2004 21:55:06 -0800 (PST) Received: from et.endace.com (et.endace.com [219.88.101.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id BABCC43D53 for ; Sun, 21 Mar 2004 21:55:05 -0800 (PST) (envelope-from abel@endace.com) Received: from patch.et.endace.com (patch.et.endace.com [192.168.1.13]) by et.endace.com (8.12.11/8.12.11) with ESMTP id i2M5t3KO006389; Mon, 22 Mar 2004 17:55:03 +1200 (NZST) From: Abel Navarro Organization: Endace Technology Ltd. To: Chuck McManis , freebsd-questions@freebsd.org Date: Mon, 22 Mar 2004 18:52:52 +1300 User-Agent: KMail/1.5.4 References: <200403221724.14033.abel@endace.com> <6.0.0.22.2.20040321205206.0285ae60@66.125.189.29> In-Reply-To: <6.0.0.22.2.20040321205206.0285ae60@66.125.189.29> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403221752.52923.abel@endace.com> X-Virus-Scanned: by amavisd-new Subject: Re: time() segmentation fault X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2004 05:55:06 -0000 Oops, you were rigth. I don't believe I have made such a mistake. Thank you Abel On Mon, 22 Mar 2004 16:54, Chuck McManis wrote: > At 09:24 PM 3/21/2004, Abel Navarro wrote: > >Hi all, > >this program ends with a segmentation fault in a FreeBSD 5.1.2-RELEASE: > > > >main() { time(); } > > Good for it! Seeing as time takes a pointer to a time_t, not passing it one > would use what ever happened to be on the stack as a pointer. > > >I don't have made important changes to the release except cosmetic ones. > > I'm running the Linux compatibility module and have compiled with gcc > > 3.3.3. Any ideas are welcome. > > Change it to > main() { time(0); } > > And tell us if it crashes then. > > --Chuck