https://bugs.kde.org/show_bug.cgi?id=463514

--- Comment #4 from Raju Ponnagani <shivaraju173ponnag...@gmail.com> ---
Verified with the changes as you mention, leaks get detected under definitely
lost of Leak Summary. But not shows the exact function name (leak_func ) where
the leak happened in the application.

Code Snippet:-
int leak_func(void){
/*      char *ptr = NULL;
        ptr = (char *) calloc(1,20);
        ptr = "Hello World\n";
*/
        volatile char* ptr = strdup("Hello World\n");
        printf("%s \n",ptr);
        return 0;
}

==23123== 13 bytes in 1 block are definitely lost in loss record 18 of 42
==23123==    at 0x481E1F0: malloc (vg_replace_malloc.c:298)
==23123==    by 0x4866DFF: strdup (in /system/lib/libc.so)
==23123== 

==23123== LEAK SUMMARY:
==23123==    definitely lost: 13 bytes in 1 blocks
==23123==    indirectly lost: 0 bytes in 0 blocks
==23123==      possibly lost: 48 bytes in 1 blocks
==23123==    still reachable: 14,843 bytes in 40 blocks
==23123==         suppressed: 0 bytes in 0 blocks

execution:-
$valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all
--show-reachable=yes --track-fds=yes --trace-children=yes --track-origins=yes
--smc-check=all --extra-debuginfo-path=path --demangle=yes --num-callers=20
--show-below-main=yes --log-file=/data/local/data.txt -v /system/bin/leak-test


any thoughts?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to