On Tue, Jan 14, 2014 at 11:37 AM, Philippe Waroquiers <
philippe.waroqui...@skynet.be> wrote:

> On Tue, 2014-01-14 at 11:29 -0500, Mike Shal wrote:
> > O
> >
> > Maybe you can do it with a shell-script wrapper? Eg:
> >
> >
> > run-me.sh:
> >
> > #! /bin/sh
> >
> > LD_PRELOAD=./libfakec.so ./myapp -e
> >
> >
> > Then run:
> >
> > valgrind --trace-children=yes ./run-me.sh
>
> I do not think so, as the trace-children=yes will cause the valgrind
> launcher to be relaunched to launch myapp. And this valgrind child
> will then use the problematic LD_PRELOAD library.
>
>
Oh, hmm. I had just tried a simple LD_PRELOAD test with wrapping fopen()
and open(). I added a constructor function to the library to see where it
gets initialized, and it does indeed get added to valgrind with
--trace-children=yes. So, scratch that.

We might maybe need to add a valgrind option
>    --client-ld-preload=......
> to avoid such problem ?
>

Or maybe a more general --client-environment? That way it's not specific to
LD_PRELOAD.

-Mike
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to