Valgrind is not allocating heap even if the code uses malloc function in amd64

Asked by sona

When I run valgrind for 32 bit binary in arm,

There are no heap allocations though the code uses functions such as malloc. Also I'm getting few warnings such as {debuginfo section duplicates a section in the main ELF file}

==1477603== HEAP SUMMARY:
==1477603== in use at exit: 0 bytes in 0 blocks
==1477603== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==1477603==
==1477603== All heap blocks were freed -- no leaks are possible
==1477603==
==1477603== Use --track-origins=yes to see where uninitialised values come from
==1477603== For lists of detected and suppressed errors, rerun with: -s
==1477603== ERROR SUMMARY: 3 errors from 1 contexts (suppressed: 0 from 0)

The same code when I run on x86, it allocates heap and produces leak summary.
HEAP SUMMARY:
==19207== in use at exit: 25,000 bytes in 5 blocks
==19207== total heap usage: 11 allocs, 6 frees, 118,728 bytes allocated
==19207==
.
.
.

==19549== LEAK SUMMARY:
==19549== definitely lost: 25,000 bytes in 5 blocks
==19549== indirectly lost: 0 bytes in 0 blocks
==19549== possibly lost: 0 bytes in 0 blocks
==19549== still reachable: 0 bytes in 0 blocks
==19549== suppressed: 0 bytes in 0 blocks
==19549==
==19549== For counts of detected and suppressed errors, rerun with: -v
==19549== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)

So valgrind is able to detect the memory leak in x86 but not in arm for the same binary. Could you help me to resolve this issue or anyone had faced such a similar one?

Valgrind version: 3.14.0

Please feel free to ask any additional details!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu valgrind Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bernard Stafford (bernard010) said :
#1
Revision history for this message
sona (sona31) said :
#2

Hi Bernard,

Ubuntu version we used is 18.04.3And we had downloaded the valgrind tar from official valgrind page.

Can you help with this problem?

Provide an answer of your own, or ask sona for more information if necessary.

To post a message you must log in.