cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Repeatable crash

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 2 Apr 2002 08:38:10 +0200 (MET DST)

On Fri, 29 Mar 2002, Jacky Lam wrote:

> Currently, when I visit cnn.com with libcurl, I experience a repeatable
> crash.

> It is cause by the memory debug utiltiy in libcurl. A malloc from
> lib/transfer.c is replaced by curl_domalloc when memdebug.h is included.
> However, the pointer will be get freed in lib/getinfo.c where memdebug.h is
> not include even MALLOCDEBUG is defined.
>
> The fix is just add back the lines after all the includes in getinfo.c
>
> #ifdef MALLOCDEBUG
> #include "memdebug.h"
> #endif

Great catch! I've applied your fix.

For others: this only concerns builds that has the MALLOCDEBUG system enabled
(like ./configure --enable-debug switches on).

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-04-04