std.net.curl and libcurl.so

Joseph Rushton Wakeling via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Sep 24 12:11:52 PDT 2016


On Friday, 23 September 2016 at 00:55:43 UTC, Stefan Koch wrote:
> This suggests that libcurl is loaded.
> could you compile with -g ?
> and then post the output ?

Thanks Stefan!  It was compiled with -g, but I was missing the 
libcurl3-dbg package.  Here's the results:

#0  0x000000000046b048 in gc.gc.Gcx.smallAlloc(ubyte, ref ulong, 
uint) ()
#1  0x000000000046918a in gc.gc.GC.malloc(ulong, uint, ulong*, 
const(TypeInfo)) ()
#2  0x00000000004682bc in gc_qalloc ()
#3  0x000000000046293b in core.memory.GC.qalloc(ulong, uint, 
const(TypeInfo)) ()
#4  0x00000000004534f2 in 
std.array.Appender!(char[]).Appender.ensureAddable(ulong) ()
#5  0x00000000004530c5 in 
std.uni.toCase!(std.uni.toLowerIndex(dchar), 1043, 
std.uni.toLowerTab(ulong), 
char[]).toCase(char[]).__foreachbody2(ref ulong, ref dchar) ()
#6  0x000000000046dc96 in _aApplycd2 ()
#7  0x000000000044d997 in 
std.net.curl.HTTP.Impl.onReceiveHeader(void(const(char[]), 
const(char[])) delegate).__lambda2(const(char[])) ()
#8  0x0000000000451d78 in 
std.net.curl.Curl._receiveHeaderCallback(const(char*), ulong, 
ulong, void*) ()
#9  0x00007ffff6f75a1d in Curl_client_chop_write 
(conn=conn at entry=0x741fd0, type=type at entry=2,
     ptr=0x72d3a0 "Server: Apache/2.4.17 (FreeBSD) OpenSSL/1.0.2d 
PHP/5.6.16\r\n", len=59) at sendf.c:454
#10 0x00007ffff6f75b9d in Curl_client_write 
(conn=conn at entry=0x741fd0, type=type at entry=2,
     ptr=<optimised out>, len=<optimised out>) at sendf.c:511
#11 0x00007ffff6f73f90 in Curl_http_readwrite_headers 
(data=data at entry=0x72fb60,
     conn=conn at entry=0x741fd0, nread=nread at entry=0x7fffffffd370,
     stop_reading=stop_reading at entry=0x7fffffffd36f) at http.c:3739
#12 0x00007ffff6f8be30 in readwrite_data (done=0x7fffffffd40b, 
didwhat=<synthetic pointer>, k=0x72fbd8,
     conn=0x741fd0, data=0x72fb60) at transfer.c:492
#13 Curl_readwrite (conn=0x741fd0, data=data at entry=0x72fb60, 
done=done at entry=0x7fffffffd40b)
     at transfer.c:1074
#14 0x00007ffff6f95f42 in multi_runsingle 
(multi=multi at entry=0x7388b0, now=...,
     data=data at entry=0x72fb60) at multi.c:1544
#15 0x00007ffff6f96ddd in curl_multi_perform 
(multi_handle=multi_handle at entry=0x7388b0,
     running_handles=running_handles at entry=0x7fffffffd5a4) at 
multi.c:1821
#16 0x00007ffff6f8d84b in easy_transfer (multi=0x7388b0) at 
easy.c:724
#17 easy_perform (events=false, data=0x72fb60) at easy.c:812
#18 curl_easy_perform (easy=0x72fb60) at easy.c:831
#19 0x000000000044f971 in 
std.net.curl.HTTP.perform(std.typecons.Flag!("throwOnError").Flag) ()
#20 0x000000000040db01 in 
std.net.curl._basicHTTP!(char)._basicHTTP(const(char)[], 
const(void)[], std.net.curl.HTTP) ()
#21 0x00000000004031ff in std.net.curl.get!(std.net.curl.HTTP, 
char).get(const(char)[], std.net.curl.HTTP) ()
#22 0x0000000000403020 in 
std.net.curl.get!(std.net.curl.AutoProtocol, 
char).get(const(char)[], std.net.curl.AutoProtocol) ()
#23 0x0000000000402f98 in D main ()


> Also the call seems to fail during allocation.

Yup.  And that allocation seems to occur during use of an 
Appender while converting unicode text to lowercase ... ?


More information about the Digitalmars-d-learn mailing list