|
From: Filip B. <fil...@gm...> - 2014-07-09 14:43:16
|
Hi, anyone can help with this problem of valgrind failure on an embedded mips platform? Executing valgrind /bin/ls (as well as with any other binary) always fails shortly after starting because of: Inconsistency detected by ld.so: ../elf/dl-sysdep.c: 457: _dl_important_hwcaps: Assertion `m == cnt' failed! This is Linux version 2.6.27.39 (gcc version 4.3.2 ) #1 SMP PREEMPT Thu Mar 27 14:46:35 KST 2014 mips64 mips64 mips64 GNU/Linux with glibc 2.8, ld-2.8.so valgrind was cross compiled. I have little experience with linux shared lib mechanics so not sure what is needed to investigate this but I am willing to provide necessary information if specific instructions are given. Regards, Filip |
|
From: Filip B. <fil...@gm...> - 2014-07-22 09:00:42
|
Hi, anyone can help with this problem of valgrind failure on an embedded mips platform? Executing valgrind /bin/ls (as well as with any other binary) always fails shortly after starting because of: Inconsistency detected by ld.so: ../elf/dl-sysdep.c: 457: _dl_important_hwcaps: Assertion `m == cnt' failed! This is Linux version 2.6.27.39 (gcc version 4.3.2 ) #1 SMP PREEMPT Thu Mar 27 14:46:35 KST 2014 mips64 mips64 mips64 GNU/Linux with glibc 2.8, ld-2.8.so valgrind was cross compiled. I have little experience with linux shared lib mechanics so not sure what is needed to investigate this but I am willing to provide necessary information if specific instructions are given. Regards, Filip |
|
From: lmx <lm...@sa...> - 2015-04-03 13:47:30
|
Hi guys,
I am developing an app, and at the state it is, i am looking now to
details...
I tried valgrind-3.8.1, on Debian amd_64.
struct record{
uint8_t data_size;
uint8_t rec_type;
uint16_t addr;
uint8_t *data;
uint8_t checksum;
};
struct holder{
uint32_t nrecords;
struct record *records;
};
struct holder blahhh = {0, NULL);
blahhh.records = ( struct record *) calloc( sizeof( struct record ),
holder.nrecords );
blahhh.records[ record_no ].data = calloc( record_len, 1 );//I alloc an
amount of record data chars
when i freed the mem i free everithyng
free(blahhh.records[ record_no ].data);
free(blahhh.records);
my problem is..
I run :
valgrind ./program
and I get lots of unitialized blocks :S
..
....
.....
==24106== Use of uninitialised value of size 8
==24106== at 0x40A9ED: _int_free (in
/home/tuxd3v/Desktop/geany/lypus_parser/parsers)
==24106== by 0x401782: ihx_close (ihx.c:162)
==24106== by 0x401E2C: main (main.c:18)
==24106==
==24106== Use of uninitialised value of size 8
==24106== at 0x40ACC0: _int_free (in
/home/tuxd3v/Desktop/geany/lypus_parser/parsers)
==24106== by 0x401782: ihx_close (ihx.c:162)
==24106== by 0x401E2C: main (main.c:18)
==24106==
==24106==
==24106== HEAP SUMMARY:
==24106== in use at exit: 0 bytes in 0 blocks
==24106== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==24106==
==24106== All heap blocks were freed -- no leaks are possible
how can total heap be:
total heap usage: 0 allocs, 0 frees, 0 bytes allocated ???
even with "valgrind --tool=memcheck ./program"
i get the same :(
does any one knows how to track the mallocs and free ??
thanks in advance
regards,
tux
|
|
From: Philippe W. <phi...@sk...> - 2015-04-03 16:20:56
|
On Fri, 2015-04-03 at 14:47 +0100, lmx wrote:
> how can total heap be:
> total heap usage: 0 allocs, 0 frees, 0 bytes allocated ???
>
> even with "valgrind --tool=memcheck ./program"
>
> i get the same :(
>
> does any one knows how to track the mallocs and free ??
The classical explanations for the above are:
1. the application is statically linked
2. the application is using an alternate malloc library
(e.g. tcmalloc or jemalloc or ...)
3. the dynamic loader does not support LD_PRELOAD
For 1 and 2, you can use --soname-synonyms=... to indicate to
valgrind that the malloc lib is static or in which soname it is found.
For 3, you have to find (or recompile) a dynamic loader
that supports LD_PRELOAD.
Philippe
|