cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Segmentation fault in SCO Unixware with libcurl,why?

From: 黄志军 <hzhijun_at_huawei.com>
Date: Wed, 20 Oct 2004 09:48:34 +0800

I made some test and found that if there is a repsonse message from the http server,
whether it is a normal response or a abnormal repsonse, the httpget program will sure core dump.

HTTP Server(with SSL support): https://10.70.101.23
HTTP Server(without SSL support): http://10.70.101.33

1) if i 'get' a url that not exist, the httpget will block for a long time( i think maybe it is right for the machenism)
2) if i 'get' a url from a http server with ssl(url = http://10.70.101.23/index.htm), the curl_perform returns value = 7(i think it right since i use http instead of https)
3) if i 'get' a url from a http server with ssl(url = https://10.70.101.23/index.htm), httpget core dump.
    From the follwing ssl_engine_log, it means httpget program has already send request to the apache.
** ssl_engine_log in apache+ssl server********
[20/Oct/2004 09:27:00 01152] [info] Connection to child 44 established (server 10.70.107.123:443, client 10.71.105.40)
[20/Oct/2004 09:27:00 01152] [info] Seeding PRNG with 1160 bytes of entropy
[20/Oct/2004 09:27:00 01152] [trace] OpenSSL: Handshake: start
[20/Oct/2004 09:27:00 01152] [trace] OpenSSL: Loop: before/accept initialization
[20/Oct/2004 09:27:00 01152] [debug] OpenSSL: read 0/11 bytes from BIO#008B2A20 [mem: 03C7F008] (BIO dump follows)
+-------------------------------------------------------------------------+
+-------------------------------------------------------------------------+
[20/Oct/2004 09:27:00 01152] [info] Spurious SSL handshake interrupt[Hint: Usually just one of those OpenSSL confusions!?]

** core dump information *********************
Program received signal SIGSEGV, Segmentation fault.

#0 0xbff36ad0 in _s_port_lock () from /home/cry/lib/libcurl.so.3
#1 0xbff597fd in curl_strnequal (first=0xbff68248 "HTTP/", second=0x80e21d0 "HTTP/1.1 200 OK\r\n", max=5) at strequal.c:60
#2 0xbff56d52 in checkhttpprefix (data=0x5, s=0x80e21d0 "HTTP/1.1 200 OK\r\n") at transfer.c:184
#3 0xbff57112 in Curl_readwrite (conn=0x80e25b8, done=0x7ffff5c3 "") at transfer.c:386
#4 0xbff58d5b in Transfer (conn=0x80e25b8) at transfer.c:1480
#5 0xbff59593 in Curl_perform (data=0x80d9e60) at transfer.c:1985
#6 0xbff5a1b9 in curl_easy_perform (curl=0x80d9e60) at easy.c:378
#7 0x804ac02 in main () at httpget.c:32

4) if i 'get' a url from a http server without ssl(url = http://10.70.101.33/index.htm), httpget core dump. and the seqmentation fault is
    the same with the above core dump information.

----- Original Message -----
From: "Daniel Stenberg" <daniel-curl_at_haxx.se>
To: "libcurl development" <curl-library_at_cool.haxx.se>
Sent: Tuesday, October 19, 2004 9:41 PM
Subject: Re: Segmentation fault in SCO Unixware with libcurl,why?

On Tue, 19 Oct 2004, [gb2312] »ÆÖ¾¾ü wrote:

> Platform Information: UnixWare sco-gfep 5 7.1.1 i386 x86at SCO UNIX_SVR5

> Program received signal SIGSEGV, Segmentation fault.
>
> #0 0xbff36ad0 in _s_port_lock () from /home/cry/lib/libcurl.so.3
> #1 0xbff597fd in curl_strnequal (first=0xbff68248 "HTTP/", second=0x80e21d0 "HTTP/1.1 200 OK\r\n", max=5) at strequal.c:60

Please explain to me how this can crash at that point?

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-10-20