curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

libcurl with custom malloc and SSL

From: Ville Likitalo via curl-library <>
Date: Tue, 25 May 2021 12:25:08 +0300


        I am trying out libcurl 7.64.0 (right now stuck with that version
        for political reasons) with custom malloc implementation and SSL.

        This was the result:

        [Thread 0x7fffd3fff700 (LWP 147) exited]
        *** Error in `/...': free(): invalid pointer:
        0x00007ffff7eb8200 ***

        Thread 1 "..." received signal SIGABRT, Aborted.
        0x00007ffff4b3e420 in raise () from /lib64/
        (gdb) backtrace
        #0 0x00007ffff4b3e420 in raise () from /lib64/
        #1 0x00007ffff4b3fa01 in abort () from /lib64/
        #2 0x00007ffff4b81877 in __libc_message () from
        #3 0x00007ffff4b88093 in malloc_printerr () from
        #4 0x00007ffff4b89999 in _int_free () from /lib64/
        #5 0x00007ffff69481be in OPENSSL_sk_free () from
        #6 0x00007ffff65094fe in SSL_CTX_free () from
        #7 0x00007ffff59f0448 in ?? () from /usr/lib64/
        #13 0x00007ffff59c42a3 in curl_multi_perform () from
        #14 0x00007ffff59bad1b in curl_easy_perform () from

        The only interesting bit in the stack trace is that the pointer
        which gets passed to libc free(void*) is one that has been
        allocated with the private malloc libcurl has been set up with.

        Now, I could not quickly find any existing open or closed bug
        that would describe this but would this already be fixed in the
        later versions?

        - Ville Likitalo
	"Lisäydinvoimaa tarvitaan EU:n tarpeisiin ei Suomen.
	Suomessa tuotettu "halpa" sähkö myydään sähkömarkkinoilla
	Saksaan ja muihin EU-maihin."
	[][+358-50-386 6269]
Received on 2021-05-25