Hello Sir,
Thank you for the help. I'm not entirely sure whether malloc is provided by
libc.so.0 or by ld-uClibc.so.0, so I've executed the requested command
against both. I'm afraid I don't know how to interpret the output, but I've
included it below:
$ readelf -d lib/libc.so.0 | grep SONAME
0x0000000e (SONAME) Library soname: [libc.so.0]
$ readelf -d lib/ld-uClibc.so.0 | grep SONAME
0x0000000e (SONAME) Library soname:
[ld-uClibc.so.0]
I've also done a readelf against the executable which I am attempting to
test. I am including below a few lines of that output which may be useful.
Dynamic section
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.0]
0x0000000f (RPATH) Library rpath: [//lib]
Symbol table '.dynsym'
Num: Value Size Type Bind Vis Ndx Name
27: 00404a40 0 FUNC GLOBAL DEFAULT UND free
97: 00404690 0 FUNC GLOBAL DEFAULT UND malloc
Finally, as requested, I've run Valgrind with the debugging options against
a very simple application with malloc (I ran it against the memory leak
test program from the Valgrind FAQ). The output is attached.
- Woodrow Barlow
On Thu, Oct 9, 2014 at 5:54 PM, Philippe Waroquiers <
philippe.waroqui...@skynet.be> wrote:
> On Wed, 2014-10-08 at 14:46 -0400, Woodrow Barlow wrote:
> > Basically, Valgrind doesn't detect any heap usage even though I've
> > used the heap. Why might this be? Are any of my assumptions (below)
> > wrong?
> The 3 known causes are:
> A statically linked
> B LD_PRELOAD not supported/not configured
> C linked with a library whose soname does not match the expected name
>
> The tests you have done exclude causes A and B.
> To exclude C, can you check the soname of the library that provides
> malloc ?
> I.e. something like:
> readelf -d /lib/libc.so.6 | grep SONAME
> giving
> 0x0000000e (SONAME) Library soname: [libc.so.6]
>
> The resulting soname should match the default expected soname pattern,
> i.e. on a linux, it is expected to match libc.so*
> If the soname of your lib does not match the above, then you can use
> --soname-synonyms=somalloc=xxxxxxxx
> where xxxxxxxx is something which matches your soname
>
> Assuming the above is not the problem, then something else/unknown is
> happening.
>
> Can you then run a small test program dynamically linked, that does
> a malloc call
> and use valgrind options
> -v -v -v -d -d -d --trace-malloc=yes --trace-redir=yes
> and send the resulting log file?
> If the file is big, you can compress it, and send it only to me.
>
> Hoping this helps
>
> Philippe
>
>
>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users