curl / Mailing Lists / curl-library / Single Mail


7.64.0 crash in threaded-shared-conn.c with static libcurl on Linux

From: Casper via curl-library <>
Date: Fri, 15 Mar 2019 23:03:45 +0000

The executable I build from the sample, threaded-shared-conn.c crashes pretty much every single time. It is linked to libcurl 7.64.0 static library. This is on Linux (Ubuntu 16.04.5), gcc 5.4.0. Here is an example backtrace:

    Core was generated by `./threaded-shared-conn'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0 0x000000000040d3a1 in Curl_add_handle_to_pipeline ()
    [Current thread is 1 (Thread 0x7effa96a1700 (LWP 27928))]
    #0 0x000000000040d3a1 in Curl_add_handle_to_pipeline ()
    #1 0x00000000004077a1 in multi_runsingle ()
    #2 0x0000000000408ac1 in curl_multi_perform ()
    #3 0x0000000000402f9b in curl_easy_perform ()
    #4 0x0000000000402983 in run_thread ()
    #5 0x00007effac4926ba in start_thread (arg=0x7effa96a1700) at pthread_create.c:333
    #6 0x00007effabfae41d in clone () at clone.S:109

I went back some versions and it didn't crash with curl-7.56.0. I see that there were two crash reports in the area previously (issues 3391 and 2132), but do not see an open bug in 7.64.0.

Here is how I build and run the test
    tar xvzf curl-${version}.tar.gz
    cd curl-${version}

    ./configure --prefix=${buildfolder} --disable-shared --without-ssl
    make install

    gcc -DCURL_STATICLIB -I${buildfolder}/include/ -o threaded-shared-conn threaded-shared-conn.c -L${buildfolder}/lib -lcurl -lpthread -lz

Do let me know if I need to provide more details from the cores, or anything else. I tried changing all sorts of things with no luck so far.


Received on 2019-03-16