This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: tree-ssa -fmudflap problems
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: Eyal Lebedinsky <eyal at eyal dot emu dot id dot au>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 31 Mar 2003 21:07:13 -0500
- Subject: Re: tree-ssa -fmudflap problems
- References: <3E865070.F1DF0A52@eyal.emu.id.au> <o5he9j8sbm.fsf@toenail.toronto.redhat.com> <3E88BDE7.A1FF8C25@eyal.emu.id.au>
Hi -
On Tue, Apr 01, 2003 at 08:15:03AM +1000, Eyal Lebedinsky wrote:
> > You might try linking your program without -lpthread.
> > (lib)mudflap does not support multithreaded apps yet.
> This is a problem as my application is heavily
> multithreaded. Any way around it?
There are two separate issues. The first issue is that the
libmudflap runtime does not protect its internal data structures
from multithreaded access. At the least, it just needs some
mutexes here and there. The second issue is that there is an
odd litle infinite recursion during the shared library startup
of libmudflap when -lpthreads is linked in. (dlsym requires
calloc; calloc requires dlsym.) Until this is fixed, static
linking may work around it.
As for the smaller test program you sent, I believe my fixes
this afternoon make it run correctly.
- FChE