curl-library
segfaulting in Curl_num_addresses on OS X and Ubuntu
Date: Wed, 29 Jul 2015 20:14:06 +0000
Hi!
I'm using libcurl's "multi" API and it seems certain older versions crash
deep inside the first call to curl_multi_perform().
On Ubuntu 14.04.1, which comes with curl v7.35.0, the backtrace is:
#0 Curl_num_addresses (addr=0x323a22656761222c) at hostip.c:159
#1 0x00007f1eaded8b86 in Curl_connecthost (conn=conn_at_entry=0x7f1ebf4df0d8,
remotehost=0x7f1ebf4e5138)
at connect.c:1122
#2 0x00007f1eadec8cf3 in Curl_setup_conn (conn=conn_at_entry=0x7f1ebf4df0d8,
protocol_done=0x7fffef9f8625) at url.c:5596
#3 0x00007f1eadedf26c in Curl_async_resolved (conn=0x7f1ebf4df0d8,
protocol_done=protocol_done_at_entry=0x7fffef9f8625)
at hostasyn.c:133
#4 0x00007f1eadedb5e9 in multi_runsingle (multi=multi_at_entry=0x7f1ebf4850f0,
now=..., data=data_at_entry=0x7f1ebf4ecd80)
at multi.c:1094
#5 0x00007f1eadedc181 in curl_multi_perform (multi_handle=0x7f1ebf4850f0,
running_handles=0x7fffef9f86fc)
at multi.c:1752
And on OS X, backtrace is basically identical:
* thread #1: tid = 0x0000, 0x00007fff96e3825e
libcurl.4.dylib`Curl_num_addresses + 8, stop reason = signal SIGSTOP frame
#0: 0x00007fff96e3825e libcurl.4.dylib`Curl_num_addresses + 8
libcurl.4.dylib`Curl_num_addresses: -> 0x7fff96e3825e <+8>: movq
0x28(%rdi), %rdi 0x7fff96e38262 <+12>: incl %eax 0x7fff96e38264 <+14>:
testq %rdi, %rdi 0x7fff96e38267 <+17>: jne 0x7fff96e3825e ; <+8> (lldb) bt
* thread #1: tid = 0x0000, 0x00007fff96e3825e
libcurl.4.dylib`Curl_num_addresses + 8, stop reason = signal SIGSTOP *
frame #0: 0x00007fff96e3825e libcurl.4.dylib`Curl_num_addresses + 8 frame
#1: 0x00007fff96e5c086 libcurl.4.dylib`Curl_connecthost + 74 frame #2:
0x00007fff96e4c8bb libcurl.4.dylib`Curl_setup_conn + 284 frame #3:
0x00007fff96e62473 libcurl.4.dylib`Curl_async_resolved + 45 frame #4:
0x00007fff96e5e89b libcurl.4.dylib`multi_runsingle + 744 frame #5:
0x00007fff96e5e520 libcurl.4.dylib`curl_multi_perform + 170
If I install 7.37.0 or greater on either platform everything works just
fine.
So... are there known issues with versions <7.37.0 where the "multi" API
segfaults? And I realize I haven't described *how* I'm using it, could I
be using it wrong?
Thanks so much for your time!
eric
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-07-29