Re: No "by" message in memcheck output

Paul FLOYD <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <1829410203.831.1626162703639.JavaMail.www@wwinf1g07>
> De : "Michael Ortiz" 
> Objet : [Valgrind-users] No "by" message in memcheck output


Hi

It's possible that the call to malloc is before the start of main
(either from your libc or for the initialization of some static or global object).
I know next to nothing about the ARM ABI, but on amd64 Linux
the callstack in this case contains things like

==1441== 4 bytes in 1 blocks are still reachable in loss record 1 of 2
==1441== at 0x402DF66: operator new(unsigned long) (vg_replace_malloc.c:417)
==1441== by 0x401187: __static_initialization_and_destruction_0(int, int) (source.cpp:1)
==1441== by 0x4011A4: _GLOBAL__sub_I_pi (l.cpp:3)
==1441== by 0x4011FC: __libc_csu_init (in /home/user/exe)
==1441== by 0x4D48364: (below main) (in /usr/lib64/libc-2.17.so)

Can you run your app under gdb, but a break on malloc and then run.
You should be able to see the callstack and then be able to tell if
Valgrind is telling you the right thing or not.

A+
Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.