cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Test patches

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 11 May 2004 23:21:37 +0200 (CEST)

On Tue, 11 May 2004, Gisle Vanem wrote:

> > Ares calls free(0) at ares_init.c:457 in one malloc failure, so prevent
> > curl_dofree() asserting:
>
> This is IMHO a horrible hack. Whos briliant idea was it to allow free(NULL)?
> This will just sweep potential bugs under the carpet.

I agree with Gisle on this. I think free()ing NULL is a sign of a programming
mistake that we should prevent. That's why the memdebug system still has that
assert on free(NULL).

James, I can't manage to get a free(NULL) in ares when I run runtests.pl -t
[num] on the first 8 tests with my ares-enabled curl? Can you figure out a fix
for this in the c-ares side instead?

Speaking about memory leak detection: I intend to (at least temporarily)
disable the memory debug system in the curl app, as leaks are not that
important there, and then work more on fixing the leaks we still have in
libcurl and when closing in, adding -t testing to the general test suite. I'd
love to see this tested error-free in the autobuilds...

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-05-11