time() segmentation fault

Abel Navarro abel at endace.com
Sun Mar 21 21:55:06 PST 2004


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



More information about the freebsd-questions mailing list