[PATCH] libcurl/Curl_resolv_timeout: curl_jmpenv should be set before alarm() call
Date: Thu, 13 Oct 2011 13:33:05 +0200
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:
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.
The attached patch simply moves sigsetjmp() before alarm().
Received on 2011-10-13