Re: bb segfault - will someone please confirm?
Lennart Sorensen wrote:
>
> Turns out it is a memory wipe caused elsewhere in the program as far as
> I can tell.
>
> If you fix this bug, it seems to run perfectly all the way through:
>
> tex.c line 95:
> Was: memset(zbuff, 0x55, (X_s * Y_s * sizeof(long)));
> Should be: memset(zbuff, 0x55, (X_s * Y_s * sizeof(int)));
>
> Len Sorensen
>
>
Thank you for the fix! That was more than I expected. Also, thank you to
the others for confirming this.
Am I right in deducing that this bug doesn't show on i386 because both
int and long are 32-bit, whereas on amd64 longs are 64-bit?
I just tested your fix on an i386 machine; no problems. I'll send the
attached patch to the debian bug tracking system.
-Corey
diff -Naur bb-1.3rc1.orig/tex.c bb-1.3rc1/tex.c
--- bb-1.3rc1.orig/tex.c 2001-04-26 08:52:27.000000000 -0700
+++ bb-1.3rc1/tex.c 2005-04-12 20:15:41.000000000 -0700
@@ -92,7 +92,7 @@
static inline void clear_zbuff()
{
- memset(zbuff, 0x55, (X_s * Y_s * sizeof(long)));
+ memset(zbuff, 0x55, (X_s * Y_s * sizeof(int)));
}
Reply to: