cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl library bug

From: Viktor Molnar <viktor.molnar_at_inbox.com>
Date: Wed, 23 Jun 2010 22:20:17 -0800

Thank you for your reply.
I know about the possible segfaults, but if you try my example
from my original message, you will see the problem. This segfault
is rised when timeout is reached. That's why is timeout set to 1 in
my example from original message. In example, http://www.alza.sk is used,
because on this site, timeout is reached. To be more specific about the
segfault, here is gdb output:

Core was generated by `./a.out'.
Program terminated with signal 11, Segmentation fault.
#0 0xb7745c79 in addbyter () from /usr/lib/libcurl.so.4
(gdb) where
#0 0xb7745c79 in addbyter () from /usr/lib/libcurl.so.4
#1 0xb7746eff in dprintf_formatf () from /usr/lib/libcurl.so.4
#2 0xb7747760 in curl_mvsnprintf () from /usr/lib/libcurl.so.4
#3 0xb7745e02 in curl_msnprintf () from /usr/lib/libcurl.so.4
#4 0xb7734e66 in Curl_failf () from /usr/lib/libcurl.so.4
#5 0xb772a5f4 in Curl_resolv_timeout () from /usr/lib/libcurl.so.4
#6 0xb6bc7d90 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thank you for your replyies

> -----Original Message-----
> From: dan_at_coneharvesters.com
> Sent: Wed, 23 Jun 2010 10:55:32 -0700
> To: curl-library_at_cool.haxx.se
> Subject: Re: curl library bug
>
> On Wed, Jun 23, 2010 at 02:08:39AM -0800, Viktor Molnar wrote:
>> I have been trying this example:
>> http://curl.haxx.se/libcurl/c/multithread.html
>> and it's working fine.
>>
>> But, when I made a few changes (num of threads and URL), it's
>> generated an 'segmentation fault'.
>
> What address causes the fault? There are a number of places in the
> code you sent where error codes are not being checked, and where
> an error could easily cause a segfault. The two big ones are
> curl_easy_init() and curl_global_init().
>
>>>> Dan
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-24