cURL / Mailing Lists / curl-library / Single Mail


curl seg fault

From: David Byron <>
Date: Mon, 27 Mar 2006 12:18:55 -0800

I'm having trouble with the curl executable but since this is a little
hairy, I'm posting to curl-library.

I just built from the latest code in CVS and I'm getting a segfault.

$ ./curl --version
curl 7.15.4-CVS (i686-pc-linux-gnu) libcurl/7.15.4-CVS OpenSSL/0.9.7a
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: Debug Largefile NTLM SSL libz

Here's how I'm invoking curl:

$ ./curl -d mo=R -d y=1 -d m=5 http://localhost:8739/mapview/index.jsp

Removing any of the -d args makes it work. Changing the order of the
-args doesn't seem to change anything -- it still segfaults. Changing
the name of the param or value doesn't seem to change anything.

Changing the URL has an effect though. Wrapping it in quotes doesn't
make a difference but

./curl -d mo=R -d y=1 -d m=5 http://localhost:8739/mapvie

gives me a segfault and

./curl -d mo=R -d y=1 -d m=5 http://localhost:8739/mapvi


This also happens to me on 7.15.3

Here's some host info

$ uname -a
Linux <my hostname> 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003
i686 i686 i386 GNU/Linux

I configured with:

 ./configure --disable-shared --enable-debug --enable-maintainer-mode

This seems like the kind of thing that would have bitten people long
ago. Anyone see a build problem?

In case it helps:

$ ldd curl => /lib/ (0xb75a2000) => /lib/ (0xb74b1000) => /usr/kerberos/lib/
(0xb749e000) => /usr/kerberos/lib/ (0xb7440000) => /usr/kerberos/lib/
(0xb743e000) => /usr/kerberos/lib/
(0xb742e000) => /lib/ (0xb741b000) => /lib/ (0xb7418000) => /usr/lib/ (0xb740a000) => /lib/tls/ (0xb72d3000)
        /lib/ => /lib/ (0xb75eb000)

Finally, here's the stack trace:

#0 0xb734443e in malloc_consolidate () from /lib/tls/
(gdb) bt
#0 0xb734443e in malloc_consolidate () from /lib/tls/
#1 0xb7343a59 in _int_malloc () from /lib/tls/
#2 0xb7342dfd in malloc () from /lib/tls/
#3 0x08059aca in curl_docalloc (wanted_elements=1, wanted_size=33712,
line=289, source=0x808e4a0 "url.c") at memdebug.c:151
#4 0x0805ef64 in Curl_open (curl=0xbfffc7e0) at url.c:289
#5 0x08059236 in curl_easy_init () at easy.c:301
#6 0x08050768 in operate (config=0xbfffcbc0, argc=8, argv=0xbfffce04)
at main.c:3417
#7 0x08052ae2 in main (argc=8, argv=0xbfffce04) at main.c:4317

Thanks much for your help.

Received on 2006-03-27