Skip to content

libcurl/Curl_resolv_timeout: curl_jmpenv should be set before alarm() call#28

Closed
ettoredn wants to merge 1 commit intocurl:masterfrom
ettoredn:master
Closed

libcurl/Curl_resolv_timeout: curl_jmpenv should be set before alarm() call#28
ettoredn wants to merge 1 commit intocurl:masterfrom
ettoredn:master

Conversation

@ettoredn
Copy link
Copy Markdown

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().

@bagder
Copy link
Copy Markdown
Member

bagder commented Nov 6, 2011

This patch got comments on the mailing list that was never followed-up or answered. This pull request is closed.

@bagder bagder closed this Nov 6, 2011
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants