|
From: Julian S. <js...@ac...> - 2002-10-20 10:54:12
|
Jeremy
Not entirely sure what the outcome of this is -- can you summarise? I get
the impression that it _should_ be OK -- libpthread.so should override libc
-- but perhaps I'm wrong?
A couple of other points.
1. Your __select and __poll renamings suffer from the same problem.
2. I didn't mention this before, but ... you might want to play with the
coregrind/dosyms script. This compares the exported symbols from
V's libpthread.so vs those from the standard one; and it is how I
navigate this swamp -- to a first approximation I try and make
V's libpthread.so export the same syms as the standard one.
J
On Saturday 19 October 2002 2:50 am, Jeremy Fitzhardinge wrote:
> On Fri, 2002-10-18 at 17:52, H. J. Lu wrote:
> > > OK, but valgrind.so is already being linked with "-z initfirst"; what
> > > happens if there are two .so files with initfirst? (It does seem to
> > > work).
> >
> > Which ever comes first wins
>
> So if the order of events is:
>
> 1. run executable A, with LD_PRELOAD=valgrind.so (which has initfirst
> set)
> 2. A uses function foo() which is defined in libc.so
> 3. A doesn't use libpthread, but after a while it dlopens libB.so, which
> does
> 4. libB.so pulls in Valgrind's libpthread.so.
> 5. Valgrind's libpthread.so wants to override foo(), now that this has
> become a multithreaded program. If A uses foo() again, which definition
> will it get? libc's original one (which it was using before), or the
> new definition in libpthread.so?
>
> I wonder if the solution is to always pull in Valgrind's libpthread.so,
> but only make it do special stuff once there's more than one thread...
>
> Thanks,
> J
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:
> Access Your PC Securely with GoToMyPC. Try Free Now
> https://www.gotomypc.com/s/OSND/DD
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
|