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.

Re: Periodic segfault in curl_easy_perform()

From: Adrián Gimeno Balaguer via curl-library <>
Date: Tue, 9 Mar 2021 20:48:43 +0100

El mar, 9 mar 2021 a las 20:42, Tomalak Geret'kal via curl-library
(<>) escribió:
> On 09/03/2021 14:23, Adrián Gimeno Balaguer via curl-library
> wrote:
> > Considering the fact that apparently Valgrind is aimed to
> > detect memory leaks and it can't (easily?) detect the
> > source code line/s that might cause deferred UB errors,
> > should I even bother to install and run it on the test
> > machine?
> Yes.
> > If so, should I use any special parameters?
> No.
> Cheers
> -------------------------------------------------------------------
> Unsubscribe:
> Etiquette:

Hi everyone,

You might ignore my previous message. I have casually found the root
of this nightmare.

I had been passing a pointer of an unrelated type to curl_easy_setopt
(to set CURLOPT_POST), instead of the proper CURL handle. I've just
removed the call since the POST should be enabled already when
supplying POST fields (which I do). Apparently I had introduced the
bug inadvertently since +3 months ago.

But how is it possible that the compiler doesn't complain of that
misuse? (Even if curl_easy_setop is wrapped by a macro; a CURL handle
is required in the function call).

Anyways, problem solved.


Received on 2021-03-09