cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Segfault Error!

From: Nisan Bloch <nisof_at_clickatell.com>
Date: Wed, 19 Mar 2003 09:00:17 +0200

On Tue, 18 Mar 2003 21:15:39 +0100 (CET)
  Daniel Stenberg <daniel_at_haxx.se> wrote:
>On Tue, 18 Mar 2003, Nisan Bloch wrote:
>
>> We get a segfault using libcurl. We are using 7.10.3
>
>Is it repeatable?

I cannot make it happen, but within a few 100 requests I
get the segfault, allways in the same place.

>If so, can you provide source code that
>does it?

Some code snippets below

>Can you
>tell us a little on how you got this and what the
>sitation looked like that
>lead to this?

Multi threaded app, each thread with its own curl handle.
7.10.3 gives us the segfault, 7.9.6 our previous ver
behaves.

>What platform?
>

Linux. Intel.

[snip]
curl_handle = curl_easy_init();

//callback for data
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION,
WriteBodyCallback);
//callback for curl_headers
curl_easy_setopt(curl_handle, CURLOPT_HEADERFUNCTION
,WriteHeaderCallback);

curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(curl_handle, CURLOPT_MUTE, 1);
curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl_handle, CURLOPT_MAXREDIRS, 5);

//added to try stop core dumps.. didt help
curl_easy_setopt(curl_handle, CURLOPT_DNS_CACHE_TIMEOUT,
0);
curl_easy_setopt(curl_handle,
CURLOPT_DNS_USE_GLOBAL_CACHE,0);
curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL,1);

[unsip]

[snip]
curl_easy_setopt(curl_handle, CURLOPT_FILE, (void *)body);
curl_easy_setopt(curl_handle, CURLOPT_WRITEHEADER, (void
*)headers);

curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT,
(long)conn_timeout);

curl_res = curl_easy_perform(curl_handle);
curl_easy_getinfo(curl_handle, CURLINFO_HTTP_CODE,&stat);
  

Nisan

>--
> Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Does your code think
>in ink?
>You could win a Tablet PC. Get a free Tablet PC hat just
>for playing.
>What are you waiting for?
>http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
>

-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink?
You could win a Tablet PC. Get a free Tablet PC hat just for playing.
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
Received on 2003-03-19