tags 640498 + patch
thanks

On Mon, 2011-09-05 at 12:35 +0200, Paul Wise wrote:

> When I leave foxtrotgps open for a while without using it, I get a core
> dump due to segfault, gdb backtrace below. I have foxtrotgps-dbg,
> libcurl3-dbg, libglib2.0-0-dbg installed. I have attached my gconf
> settings for foxtrotgps in case that is needed.

After some more debugging, this seemed similar to #617647 so I tried a
similar approach to fixing it. The attached patch seems to have fixed it
for me after testing for a while.

-- 
bye,
pabs

http://wiki.debian.org/PaulWise
Author: Paul Wise <p...@debian.org>
Description:
 Tell libcurl not to use alarm() to timeout slow name-resolution, because that
 makes us crash (Closes: #640498).

--- a/src/friends.c
+++ b/src/friends.c
@@ -263,6 +263,7 @@
 	       
 	curl_handle = curl_easy_init();
 	
+	curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
 	curl_easy_setopt(curl_handle, CURLOPT_URL, "http://www.tangogps.org/friends/update_pos.php";);
 	curl_easy_setopt(curl_handle, CURLOPT_HTTPPOST, formdata);
 	curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, cb_write_to_mem);
@@ -448,6 +449,7 @@
 	
 	if(curl)
 	{
+		curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
 		curl_easy_setopt(curl, CURLOPT_URL, 
 				"127.0.0.1/friends/update_position.php?lat=1&lon=1");
 		res = curl_easy_perform(curl);
@@ -537,6 +539,7 @@
 	       
 	curl_handle = curl_easy_init();
 	
+	curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
 	curl_easy_setopt(curl_handle, CURLOPT_URL, "http://www.tangogps.org/friends/register_nick.php";);
 	curl_easy_setopt(curl_handle, CURLOPT_HTTPPOST, formdata);
 	curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, cb_write_to_mem);
--- a/src/util.c
+++ b/src/util.c
@@ -104,6 +104,7 @@
 	
 	curl_handle = curl_easy_init();
 	
+	curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
 	curl_easy_setopt(curl_handle, CURLOPT_URL, url);
 	curl_easy_setopt(curl_handle, CURLOPT_HTTPPOST, formdata);
 	curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, mycurl_write_to_mem_cb);
@@ -159,6 +160,7 @@
 	curl_global_init(CURL_GLOBAL_ALL);
 	curl_handle = curl_easy_init();
  
+	curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
 	curl_easy_setopt(curl_handle, CURLOPT_URL, url);
 	curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, mycurl_write_to_mem_cb);
 	curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to