cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] - master_buffer alloc only on pipelining set on

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 23 Apr 2007 22:00:21 +0200 (CEST)

On Sun, 22 Apr 2007, Robert Iakobashvili wrote:

>> I'm all for not using more memory than required.
>>
>> But your patch fails test 530 for me:
>
> The same patch, but cleaned from .orig hunk.

This time it segfaults on me:

$ ./runtests.pl -g 530
********* System characteristics ********
* curl 7.16.3-CVS (i686-pc-linux-gnu)
* libcurl/7.16.3-CVS OpenSSL/0.9.6b zlib/1.1.4
* Features: Debug Largefile NTLM SSL libz

[...]

Program received signal SIGSEGV, Segmentation fault.
0x401ac69f in chunk_free (ar_ptr=0x40260340, p=0x80b34e8) at malloc.c:3228
3228 malloc.c: No such file or directory.
         in malloc.c
(gdb) bt
#0 0x401ac69f in chunk_free (ar_ptr=0x40260340, p=0x80b34e8) at malloc.c:3228
#1 0x401ac3f4 in __libc_free (mem=0x80b7500) at malloc.c:3154
#2 0x0804ef2b in curl_dofree (ptr=0x80b7504, line=130,
     source=0x8083640 "llist.c") at memdebug.c:231
#3 0x0806e9d5 in Curl_llist_destroy (list=0x80b7504, user=0x0) at llist.c:130
#4 0x0805ecaa in conn_free (conn=0x80b3184) at url.c:1794
#5 0x0805c7ba in Curl_rm_connc (c=0x8090dbc) at url.c:484
#6 0x0805174a in curl_multi_cleanup (multi_handle=0x808fe4c) at multi.c:1495
#7 0x0804bc63 in test (URL=0xbffff9dc "http://127.0.0.1:8990/path/530")
     at lib530.c:161
#8 0x0804bdaa in main (argc=2, argv=0xbffff854) at first.c:74
#9 0x40147657 in __libc_start_main (main=0x804bca0 <main>, argc=2,
     ubp_av=0xbffff854, init=0x804a8d8 <_init>, fini=0x807eb60 <_fini>,
     rtld_fini=0x4000dc54 <_dl_fini>, stack_end=0xbffff84c)
     at ../sysdeps/generic/libc-start.c:129

And another host I tried it on said this:

$ ./runtests.pl 530
********* System characteristics ********
* curl 7.16.3-CVS (x86_64-unknown-linux-gnu)
* libcurl/7.16.3-CVS NSS/3.11.5 zlib/1.2.3 libidn/0.6.5
* Features: Debug IDN IPv6 Largefile SSL libz

test 530...[HTTP GET using pipelining]

** MEMORY FAILURE
FREE ERROR: Memory freed twice: MEM url.c:213 free(0x63a7024)
FREE ERROR: Previously freed at: url.c:213
FREE ERROR: Memory freed twice: MEM url.c:213 free(0x63a7024)
FREE ERROR: Previously freed at: url.c:213
FREE ERROR: Memory freed twice: MEM url.c:213 free(0x63a7024)
FREE ERROR: Previously freed at: url.c:213
Leak detected: memory still allocated: 49152 bytes
At 63b48d4, there's 16384 bytes.
  allocated by url.c:2843
At 63b018c, there's 16384 bytes.
  allocated by url.c:2843
At 63aba44, there's 16384 bytes.
  allocated by url.c:2843

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-04-23