[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#66190: treetool: Treetool causes arithmetic exception/file open on alpha



On Wed, 12 Jun 2002, Helge Kreutzmann wrote:

> This is the same impression I have looking at the lots of unpleasant
> messages from gcc when compiling the programm. Looks very 32bit
> specific.
Exactly.  On the other hand I verified that it works perfactly at
Sparc II processor which is 64 Bit as well.

> >     * I have found the exact point where the crash occures but it is
> >       caused by a strange change of a pointer value without any
> >       assigning of a value.  This means that the heap is crashed
> >       badly.  Neigther dmalloc or efence helped me for the time slice
> >       I spend in debugging.
>
> I can test patches if they are sent to me (on alpha) but since I do
> not use this programm I cannot help much myself either.
Thanks for the help.  As I said the fixed type casting I tried did not help
very much.  I can't invent patches without deeper debugging of the heap/stack
which is obviousely in a very bad state.

The Debian package contains some patches from former maintainers.  I
just mark the relevant point of code by two printf statements which are in
treetool/size.c and append the patch which just make the result visible
but does not do anything else.  (The extra patches besides the printf
statements are other patches from former Debian maintainer.)

If someone likes debugging feel free to start.
A really crude workaround would be:

     if ( nd->x == 0 ) {
        fprintf(stderr, "This program is broken on this architecture. Sorry\n");
        exit(-1);
     }

> Helge Kreutzmann, Dipl.-Phys.               Helge.Kreutzmann@itp.uni-hannover.de
                    ^^^^^^^^^^ Hallo Kollege ;-)


Kind regards and thanks for your effort

          Andreas.

--- size.c.orig	Mon May  2 22:35:24 1994
+++ size.c	Wed Jun 12 14:01:30 2002
@@ -193,6 +193,10 @@
 	if(putmidway)
 		nd->y=(topy+boty)/2.0;

+printf("%s(%i): *scalex=%g, nd->x=%g\n", __FILE__, __LINE__, *scalex, w, nd->x); fflush(stdout);
+	if (nd->x > 0.029416 && nd->x < 0.029418) {
+		sleep(0);
+	}
 	/* calculate bounds */
 	if(showlabel(n, Boxed))
 	{
@@ -205,6 +209,7 @@
 	}
 	else
 	{
+printf("%s(%i): *scalex=%g, w=%d, nd->x=%g\n", __FILE__, __LINE__, *scalex, w, nd->x); fflush(stdout);
 		if(*scalex==-1.0 || w/nd->x<*scalex)
 			*scalex=w/nd->x;
 		if(nd->y<*y1)
@@ -419,7 +424,9 @@
 			a=0.0;
 		else
 			a=atan2(dy,dx);
-		sincos(a,&s,&c); /* s=sin, c=cos */
+		/* sincos(a,&s,&c); */ /* s=sin, c=cos */
+		s = sin(a);
+		c = cos(a);

 		/* find vector from center of text to an edge, in the same direction
 			as the branch vector */


-- 
To UNSUBSCRIBE, email to debian-qa-packages-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: