Hi,

This issue was reported in http://curl.haxx.se/mail/lib-2014-02/0184.html.
Unfortunately the reporter didn't suggest his patch.

This issue is caused by locking CURL_LOCK_DATA_COOKIE with specified cookie 
files.
In this case, CURL_LOCK_DATA_COOKIE is locked before executing "FLUSH", and then
Curl_cookie_loadfiles locks CURL_LOCK_DATA_COOKIE. This condition occurs 
deadlock.
Attached as "fix_deadlock.patch" is to fix this issue.

In addition, a simple function to load cookie files is needed for Curl library.
When libcurl users just want to load their cookie files, they don't need a 
"FLUSH"
cookie process. So I suggest that "LOAD" should be added as a new function of
CURLOPT_COOKIELIST. I made a patch attached as "add_loadcmd.patch".

These two patches are made from curl 7.36.0.
Please check it.

Thanks,
Yousuke

Attachment: fix_deadlock.patch
Description: Binary data

Attachment: add_loadcmd.patch
Description: Binary data

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to