curl crashes when the dns try to resolve the host but exceeds the timout of curl

curl crashes when the dns server try to resolve the host but exceeds the timout of curl
Cannot reproduce this bug when your dns refuse to resolve the host very quickly.
The curl resolving host timeout must be triggered to produce this crash.
This happens in ios and android, but not in windows.

I tried to avoid this crash like this:
in hostip.c, comment everything in function alarmfunc

static RETSIGTYPE alarmfunc(int sig)
{
/* this is for “ansiWall -pedantic” to stop complaining! (rabe) /
/
(void)sig;
siglongjmp(curl_jmpenv, 1);
return;
*/
}

and recompile curl

Assuming you’re using curl_easy_setopt, just add the following to the list of options:

curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);

That should fix the problem on iOS, Mac and Android.