cURL / Mailing Lists / curl-library / Single Mail


RE: SegFault on RHEL 4 using 7.18.2

From: Glenn MacGregor <>
Date: Mon, 25 Aug 2008 14:05:51 -0400

Here is a bit more info. I am not too familiar with ssl development....

SSL_METHOD in good case, printed from ssluse.c:1317:
{version = 769, ssl_new = 0x6d24f0 <tls1_new>,
  ssl_clear = 0x6d2557 <tls1_clear>, ssl_free = 0x6d2534 <tls1_free>,
  ssl_accept = 0x6d5df1 <ssl_undefined_function>,
  ssl_connect = 0x6d144c <ssl23_connect>, ssl_read = 0x6d1ef1
  ssl_peek = 0x6d1f95 <ssl23_peek>, ssl_write = 0x6d203f <ssl23_write>,
  ssl_shutdown = 0x6d5df1 <ssl_undefined_function>,
  ssl_renegotiate = 0x6d5df1 <ssl_undefined_function>,
  ssl_renegotiate_check = 0x6d6ede <ssl_ok>, ssl_ctrl = 0x6cbfc5
  ssl_ctx_ctrl = 0x6cc304 <ssl3_ctx_ctrl>,
  get_cipher_by_char = 0x6d1e73 <ssl23_get_cipher_by_char>,
  put_cipher_by_char = 0x6d1ec8 <ssl23_put_cipher_by_char>,
  ssl_pending = 0x6d5df1 <ssl_undefined_function>,
  num_ciphers = 0x6d1e10 <ssl23_num_ciphers>,
  get_cipher = 0x6d1e34 <ssl23_get_cipher>,
  get_ssl_method = 0x6d1320 <ssl23_get_client_method>,
  get_timeout = 0x6d1df0 <ssl23_default_timeout>, ssl3_enc = 0x6e8ae0,
  ssl_version = 0x6d5df1 <ssl_undefined_function>,
  ssl_callback_ctrl = 0x6cc260 <ssl3_callback_ctrl>,
  ssl_ctx_callback_ctrl = 0x6cc4fb <ssl3_ctx_callback_ctrl>}

SSL_METHOD in faluire case, printed after seg fault:
{version = 769, ssl_new = 0x2594f0 <tls1_new>,
  ssl_clear = 0x259557 <tls1_clear>, ssl_free = 0x259534 <tls1_free>,
  ssl_accept = 0x25cdf1 <ssl_undefined_function>,
  ssl_connect = 0x25844c <ssl23_connect>, ssl_read = 0x258ef1
  ssl_peek = 0x258f95 <ssl23_peek>, ssl_write = 0x25903f <ssl23_write>,
  ssl_shutdown = 0x25cdf1 <ssl_undefined_function>,
  ssl_renegotiate = 0x25cdf1 <ssl_undefined_function>,
  ssl_renegotiate_check = 0x25dede <ssl_ok>,
  ssl_get_message = 0x252fc5 <ssl3_ctrl>,
  ssl_read_bytes = 0x253304 <ssl3_ctx_ctrl>,
  ssl_write_bytes = 0x258e73 <ssl23_get_cipher_by_char>,
  ssl_dispatch_alert = 0x258ec8 <ssl23_put_cipher_by_char>,
  ssl_ctrl = 0x25cdf1 <ssl_undefined_function>,
  ssl_ctx_ctrl = 0x258e10 <ssl23_num_ciphers>,
  get_cipher_by_char = 0x258e34 <ssl23_get_cipher>,
  put_cipher_by_char = 0x258320 <ssl23_get_client_method>,
  ssl_pending = 0x258df0 <ssl23_default_timeout>,
  num_ciphers = 0x26fae0 <ssl3_undef_enc_method>,
  get_cipher = 0x25cdf1 <ssl_undefined_function>,
  get_ssl_method = 0x253260 <ssl3_callback_ctrl>,
  get_timeout = 0x2534fb <ssl3_ctx_callback_ctrl>, ssl3_enc = 0x0,
  ssl_version = 0, ssl_callback_ctrl = 0, ssl_ctx_callback_ctrl = 0}

Looks like a memory corruption somewhere.....ssl_ctx_ctrl is


-----Original Message-----
[] On Behalf Of Glenn MacGregor
Sent: Monday, August 25, 2008 10:20 AM
To: libcurl development
Subject: RE: SegFault on RHEL 4 using 7.18.2

Here is the stack trace with debug.

#0 0x03a2cae0 in ssl3_undef_enc_method () from /lib/
#1 0x00f1742e in ssl_create_cipher_list (ssl_method=0x3a2dc80,
    cipher_list=0x8e4973c, cipher_list_by_id=0x8e49740,
    rule_str=0x1002837 "ALL:!ADH:+RC4:@STRENGTH") at ssl_ciph.c:849
#2 0x00f1299e in SSL_CTX_new (meth=0x3a2dc80) at ssl_lib.c:1418
#3 0x00589393 in ossl_connect_step1 (conn=0x8e47bd4, sockindex=0)
    at ssluse.c:1331
#4 0x00589f31 in ossl_connect_common (conn=0x8e47bd4, sockindex=0,
    nonblocking=true, done=0xbff9a391) at ssluse.c:1764
#5 0x0058a140 in Curl_ossl_connect_nonblocking (conn=0x8e47bd4,
    done=0xbff9a391) at ssluse.c:1849
#6 0x005a0d8c in Curl_ssl_connect_nonblocking (conn=0x8e47bd4,
    done=0xbff9a391) at sslgen.c:243
#7 0x00575a51 in https_connecting (conn=0x8e47bd4, done=0xbff9a391)
    at http.c:1751
#8 0x00575990 in Curl_http_connect (conn=0x8e47bd4, done=0xbff9a391)
    at http.c:1713
#9 0x00583622 in Curl_protocol_connect (conn=0x8e47bd4,
    protocol_done=0xbff9a391) at url.c:2803
#10 0x0059955d in multi_runsingle (multi=0x8d8ad3c, easy=0x8e46dcc)
    at multi.c:1020
#11 0x0059a1d1 in curl_multi_perform (multi_handle=0x8d8ad3c,
    running_handles=0xbff9a624) at multi.c:1460
#12 0x00d5d8c4 in TestCaseManager::process (this=0xbff9a708)
    at TestCaseManager.cpp:230
#13 0x00d4e5ec in ApplicationBase::run (this=0xbff9a6f0)
    at ApplicationBase.cpp:255
#14 0x0808f2f1 in main (argc=9, argv=0xbff9a854) at rhapMain.cpp:22

-----Original Message-----
[] On Behalf Of Daniel Stenberg
Sent: Friday, August 22, 2008 5:50 PM
To: libcurl development
Subject: Re: SegFault on RHEL 4 using 7.18.2

On Fri, 22 Aug 2008, Glenn MacGregor wrote:

> I have been using libcurl for a while and needed to make an
application I
> wrote non-blocking. So I moved to use the curl multi interface. This
> fine in all cases except when I am connecting to an https site using a

> client cert (.pem)

Any chance you can rebuild libcurl with debug enabled and test again so
we get more contents in that stack trace?

Received on 2008-08-25