Bug#409702: Solution found, patch available

2007-02-17 Thread Adolf Winterer

Hello Javier,

Nico Golde was so kind to investigate the segfault problem with cheops-ng. He 
found the solution and provided a patch for the file probe.c . 

As the program runs on a 32 bit computer without the patch this is indeed a 
plattform specific issue.

A big thank you goes to Nico for his excellent work.

With the patch applied the program ran without any problems. The patch file is 
attached.

Best regards,
   Adolf


--- cheops-ng-0.2.3/probe.c	2005-10-17 22:49:42.0 +0200
+++ probe.c	2007-02-17 13:46:45.0 +0100
@@ -92,27 +92,27 @@
 
 void get_probe_each(gpointer data, gpointer user_data)
 {
-	u32 *args = (u32 *)user_data;
-	u32 port = args[0];
+	u64 *args = (u64 *)user_data;
+	u64 port = args[0];
 	struct probe *p = (struct probe *)data;
 	struct probe **pp = (struct probe **)args[1];
 	
-//	DEBUG(printf(%s()\n, __FUNCTION__));
-	if(*pp == NULL)
+	DEBUG(printf(%s()\n, __FUNCTION__));
+	if(pp  *pp == NULL)
 	{
-		if( p-port == (u16)port)
+		if(p-port == (u16)port)
 			*pp = p;
 	}
 }
 
 struct probe *get_probe(unsigned short port)
 {
-	u32 args[2];
+	u64 args[2];
 	struct probe *p = NULL;
 	
-	DEBUG(printf(%s()\n, __FUNCTION__));
+	//DEBUG(printf(%s()\n, __FUNCTION__));
 	args[0] = port;
-	args[1] = (u32)p;
+	args[1] = (u64)p;
 	
 	g_list_foreach(probes, get_probe_each, args);
 	


Bug#409702: Solution found, patch available

2007-02-17 Thread Javier Fernández-Sanguino Peña
On Sat, Feb 17, 2007 at 02:48:49PM +0100, Adolf Winterer wrote:
 
 With the patch applied the program ran without any problems. The patch file
 is attached.

Ok. Since you confirm that the bug dissapears with the provided patch I will
make a new version upload fixing it with that patch.

Thanks

Javier


signature.asc
Description: Digital signature


Bug#409702: Solution found, patch available

2007-02-17 Thread Nico Golde
Hallo Javier,

* Javier Fernández-Sanguino Peña [EMAIL PROTECTED] [2007-02-17 15:19]:
 On Sat, Feb 17, 2007 at 02:48:49PM +0100, Adolf Winterer wrote:
  
  With the patch applied the program ran without any problems. The patch file
  is attached.
 
 Ok. Since you confirm that the bug dissapears with the provided patch I will
 make a new version upload fixing it with that patch.

Please use my last patch, since I mixed up uncommented DEBUG 
stuff in this patch.
Kind regards
Nico
-- 
Nico Golde - http://www.ngolde.de
JAB: [EMAIL PROTECTED] - GPG: 0x73647CFF
Forget about that mouse with 3/4/5 buttons,
gimme a keyboard with 103/104/105 keys!


pgpmJkMir5zlR.pgp
Description: PGP signature