bagder/curl — pull request #28 by ettoredn (2011-10-13 13:57:36+00:00)
Title: libcurl/Curl_resolv_timeout: curl_jmpenv should be set before alarm() call

Hello,
while debugging an issue in a PHP extension, i experienced some
segfaults caused by libcurl.
I found out the cause was at hostip.c:506:

siglongjmp(curl_jmpenv, 1);

curl_jmpenv was 0x0.
That happens when SIGALRM is sent *before* sigsetjmp is called at
hostip.c:609. This could happens, for example, while debugging or when
process is descheduled for a time greater than SIGALRM timeout.
This patch simply moves sigsetjmp() before alarm().