From owner-freebsd-questions@FreeBSD.ORG Sun Mar 21 21:50:04 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 B82D816A4CE for ; Sun, 21 Mar 2004 21:50:04 -0800 (PST) Received: from www.mcmanis.com (www.mcmanis.com [66.125.189.29]) by mx1.FreeBSD.org (Postfix) with SMTP id 74F8F43D39 for ; Sun, 21 Mar 2004 21:50:04 -0800 (PST) (envelope-from cmcmanis@mcmanis.com) Received: (qmail 31854 invoked from network); 22 Mar 2004 06:00:06 -0000 Received: from home.mcmanis.com (HELO manowar.mcmanis.com) (66.125.189.30) by www.mcmanis.com with SMTP; 22 Mar 2004 06:00:06 -0000 Message-Id: <6.0.0.22.2.20040321205206.0285ae60@66.125.189.29> X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Date: Sun, 21 Mar 2004 20:54:28 -0800 To: Abel Navarro , freebsd-questions@freebsd.org From: Chuck McManis In-Reply-To: <200403221724.14033.abel@endace.com> References: <200403221724.14033.abel@endace.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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:50:04 -0000 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