curl-library
How to enable valgrind debugging with libcurl?
Date: Sun, 23 Oct 2011 21:21:24 +0200
I´m using simple curl functionality in my program and recently I ran
valgrind in order to detect memory leaks I might have overlooked, but
valgrind reported some strange errors like these:
==18150== Memcheck, a memory error detector
==18150== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==18150== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h
for copyright info
==18150== Command: ...
==18150==
==18150==
==18150== HEAP SUMMARY:
==18150== in use at exit: 34,960 bytes in 2,406 blocks
==18150== total heap usage: 20,129 allocs, 17,723 frees, 2,511,467
bytes allocated
==18150==
==18150== 40 (20 direct, 20 indirect) bytes in 1 blocks are definitely
lost in loss record 383 of 445
==18150== at 0x4025BD3: malloc (vg_replace_malloc.c:236)
==18150== by 0x4AF23FD: ???
==18150== by 0x4AF2A8B: ???
==18150== by 0x4B5F957: ???
==18150== by 0x4B5F9FD: ???
==18150== by 0x4B4D814: ???
==18150== by 0x4B4E4C1: ???
==18150== by 0x4B53DE2: ???
==18150== by 0x4B5024B: ???
==18150== by 0x49B9078: ???
==18150== by 0x49D77B0: ???
==18150== by 0x49C7504: ???
==18150==
==18150== 48 (20 direct, 28 indirect) bytes in 1 blocks are definitely
lost in loss record 386 of 445
==18150== at 0x4025BD3: malloc (vg_replace_malloc.c:236)
==18150== by 0x4AF23FD: ???
==18150== by 0x4AF2A8B: ???
==18150== by 0x4B5F957: ???
==18150== by 0x4AA688D: ???
==18150== by 0x4AA6AD6: ???
==18150== by 0x4AAD248: ???
==18150== by 0x49B9082: ???
==18150== by 0x49D77B0: ???
==18150== by 0x49C7504: ???
==18150== by 0x49C76BA: ???
==18150== by 0x49834DE: ???
Which disappearead as I removed calls to curl_* functions.
What do I need to install/enable to make valgrind output the correct
stacktrace and not only ???
I installed the newest libcurl stable from source with --enable-debug
but I still didnt get any other output then the above.
Thanks!
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-23