Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 May 2012 15:58:58 -0400
From:      Eitan Adler <lists@eitanadler.com>
To:        Unga <unga888@yahoo.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Segmentation fault in FreeBSD 9.0 flockfile ()
Message-ID:  <CAF6rxgnwWX2X32mZHD7K_29_N_Y1dMC2roF6s5gYZLC4X3kBJg@mail.gmail.com>
In-Reply-To: <1335895711.57204.YahooMailNeo@web160104.mail.bf1.yahoo.com>
References:  <1335895711.57204.YahooMailNeo@web160104.mail.bf1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1 May 2012 14:08, Unga <unga888@yahoo.com> wrote:
> Hi all
>
> I'm getting a=C2=A0 Segmentation fault in FreeBSD 9.0 as follows for mypr=
og.c:
>
>
> Reading symbols from /libexec/ld-elf.so.1...done.
> Loaded symbols for /libexec/ld-elf.so.1
> #0=C2=A0 0x28ebb062 in flockfile () from /lib/libc.so.7
> [New Thread 29c04900 (LWP 100575/SDLTimer)]
> [New Thread 29c04300 (LWP 100416/myprog)]
> (gdb)
> (gdb) info threads
> * 2 Thread 29c04300 (LWP 100416/myprog)=C2=A0 0x28ebb062 in flockfile ()
> =C2=A0=C2=A0 from /lib/libc.so.7
> =C2=A0 1 Thread 29c04900 (LWP 100575/SDLTimer)=C2=A0 0x28e1527b in _umtx_=
op ()
> =C2=A0=C2=A0 from /lib/libc.so.7
> (gdb)
>
> I use -lpthread.

I doubt this is related, but using -lpthread is wrong. use -pthread
(without the l).

--=20
Eitan Adler



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