Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Mar 2004 18:52:52 +1300
From:      Abel Navarro <abel@endace.com>
To:        Chuck McManis <cmcmanis@mcmanis.com>, freebsd-questions@freebsd.org
Subject:   Re: time() segmentation fault
Message-ID:  <200403221752.52923.abel@endace.com>
In-Reply-To: <6.0.0.22.2.20040321205206.0285ae60@66.125.189.29>
References:  <200403221724.14033.abel@endace.com> <6.0.0.22.2.20040321205206.0285ae60@66.125.189.29>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403221752.52923.abel>