cURL / Mailing Lists / curl-library / Single Mail


Re: How to enable valgrind debugging with libcurl?

From: Julien Chaffraix <>
Date: Sun, 23 Oct 2011 16:09:30 -0700

>> Im 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== at 0x4025BD3: malloc (vg_replace_malloc.c:236)
>> ==18150== by 0x4AF23FD: ???
>> ==18150== by 0x4AF2A8B: ???
>> ==18150== by 0x4B5F957: ???
>> ==18150== by 0x4B5F9FD: ???
> Wow. I don't know how you would not see any symbols at all...

It must be a strip(1)'ed curl library.

>> I installed the newest libcurl stable from source with --enable-debug but
>> I still didnt get any other output then the above.
> Are you REALLY sure your valgrind run then truly used the newly build
> libcurl and not the old one by mistake?

I concur: a debug build should have all the symbols. Make sure you
either invoke the curl executable you just build (IIRC it should pick
up the newly build library too). In case, you can tweak
LD_LIBRARY_PATH to make sure the debug library is picked up.


List admin:
Received on 2011-10-24