cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to enable valgrind debugging with libcurl?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 23 Oct 2011 23:45:32 +0200 (CEST)

On Sun, 23 Oct 2011, Max wrote:

> 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== 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...

> What do I need to install/enable to make valgrind output the correct
> stacktrace and not only ???

First, valgrind should show a few symbols no matter what. But you'd get the
largest amount of details if curl (and a possibly dependency library in which
the problem might reside) was built with debug symbols present.

> 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?

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-23