On 5/22/14, Julian Seward wrote:
>
> That soname looks ok, then.  But from the log you posted
> later, it is clear that there is no malloc intercepting happening.
>
> For malloc intercepting to work, the files vgpreload_core-arm-linux.so
> and vgpreload_memcheck-amd64-linux.so need to be loaded into the process.
>
> Comparing your log with a run with a glibc based system, I see this
>
>   Reading syms from [..]/vgpreload_core-amd64-linux.so
>   Reading syms from [..]/vgpreload_memcheck-amd64-linux.so
>
> which is missing in your log.
>
> Does uCLibc implement LD_PRELOAD?  I think that is how Valgrind causes
> those two objects to be loaded into the process.
>
> J
>
That may be a clue!

Actually Valgrind sets LD_PRELOAD env variable to correct string,
pointing to existing /usr/lib/valgrind/vgpreload_core-arm-linux.so and
/usr/lib/valgrind/vgpreload_memcheck-arm-linux.so, but uClibc may have
been configured without LD_PRELOAD.
I've found this in blog entry from NeoSkye:
http://drivingtux.blogspot.com/2013/10/getting-valgrind-memcheck-to-work-with.html

He wrote:
"It turns out that valgrind actually sets the LD_PRELOAD environment
variable early in execution, before loading the executable that is to
be analyzed. This should instruct the runtime link loader to load the
libraries in LD_PRELOAD, which are the vgpreload ones. Unfortunately,
if your uclibc is configured without LD_PRELOAD (like ours was), the
loader will ignore LD_PRELOAD and valgrind won't know that the
vgpreload libraries were never loaded and malloc was not replaced.

tl;dr uclibc must be configured with LD_PRELOAD in order for
valgrind's memcheck to work. "

Will try to do that.

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to