May application work good with 7.80, after upgrade from 7.80 to 7.81 I got segmentation fault.
After some trace, I found it's becuase the position of Curl_update_timer(multi) in curl_multi_add_handle changed.
When I make connection, I call curl_multi_add_handle, in it Curl_update_timer call my time_cb where I call curl_multi_socket_action, it call multi_socket,multi_runsingle,Curl_pretransfer, I use manually added dns resolve pair, so it call Curl_loadhostpairs, in Curl_loadhostpairs, it use data->dns.hostcache which is zero, so segmentation fault.
For 7.80, data->dns.hostcache is assigned before Curl_update_timer(multi) in curl_multi_add_handle, but for 7.81, data->dns.hostcache is assigned after Curl_update_timer(multi) because it's position changed. I move Curl_update_timer(multi) to the end of curl_multi_add_handle like 7.80, everthing is ok now.
Please put ``Curl_update_timer(multi)` in appropriate place in future version.
May application work good with 7.80, after upgrade from 7.80 to 7.81 I got segmentation fault.
After some trace, I found it's becuase the position of
Curl_update_timer(multi)incurl_multi_add_handlechanged.When I make connection, I call
curl_multi_add_handle, in itCurl_update_timercall mytime_cbwhere I callcurl_multi_socket_action, it callmulti_socket,multi_runsingle,Curl_pretransfer, I use manually added dns resolve pair, so it callCurl_loadhostpairs, inCurl_loadhostpairs, it usedata->dns.hostcachewhich is zero, so segmentation fault.For 7.80,
data->dns.hostcacheis assigned beforeCurl_update_timer(multi)incurl_multi_add_handle, but for 7.81,data->dns.hostcacheis assigned afterCurl_update_timer(multi)because it's position changed. I moveCurl_update_timer(multi)to the end ofcurl_multi_add_handlelike 7.80, everthing is ok now.Please put ``Curl_update_timer(multi)` in appropriate place in future version.