cURL / Mailing Lists / curl-library / Single Mail


Crashes at inet_ntop4 when verbose is on

From: Chris Fong <>
Date: Mon, 27 Mar 2006 13:52:20 -0800


We are currently running curl 7.12.1 on Linux 2.4.20/glibc 2.3.5.

curl 7.12.1 (i386-digeo-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.6b
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: IPv6 Largefile NTLM SSL libz

We noticed libcurl intermittently crashes at Curl_inet_ntop/inet_ntop4
when verbose flag is on when we are doing HTTPS POST.

#0 0x408648dd in inet_ntop4 () from /usr/lib/
(gdb) bt
#0 0x408648dd in inet_ntop4 () from /usr/lib/
#1 0x40864b7e in Curl_inet_ntop () from /usr/lib/
#2 0x40846e62 in Curl_printable_address () from /usr/lib/
#3 0x40852c1e in verboseconnect () from /usr/lib/
#4 0x4085398f in Curl_connect () from /usr/lib/
#5 0x4085f99c in Curl_connect_host () from /usr/lib/
#6 0x4085fbb6 in Curl_perform () from /usr/lib/
#7 0x408602ac in curl_easy_perform () from /usr/lib/

I can't reproduce the problem all the time but the frequency tends to be
roughly once every hundreds times under stress test. What we are doing
is repeating the following steps serially with the same curl handle:

1) HTTPS GET (URL1, no verbose)
2) curl_easy_reset()
3) HTTPS POST (URL2, same host as URL1, verbose)

Browsing around, I noticed someone else has the similar crash stack

I then noticed in a slightly newer version of curl (7.12.2), there is a
fix that may have addressed this issue.

* a case of read-already-freed-data when CURLOPT_VERBOSE is used and a
(very) persistent connection

Before I make any change to upgrade to the newer version of libcurl, I
would like to know am I in the right direction? (Is my case considered
to be a very persistent connection?) Or there is something else I am


Received on 2006-03-28