Fix strace wackiness on MIPS

Daniel Jacobowitz drow at false.org
Mon Dec 16 18:37:02 UTC 2002


The easiest of my pending patches.  MIPS has 128 signals where most
architectures have 64.  As a consequence we can overflow this buffer, and
very strange things start to happen.  I made it slightly larger than
necessary, because I don't want to find out that I underestimated.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2002-12-16  Daniel Jacobowitz  <drow at mvista.com>

	* signal.c [LINUX] (sprintsigmask): Increase size of buffer.

Index: signal.c
===================================================================
RCS file: /cvsroot/strace/strace/signal.c,v
retrieving revision 1.37
diff -u -p -r1.37 signal.c
--- signal.c	15 Dec 2002 23:58:41 -0000	1.37
+++ signal.c	17 Dec 2002 02:31:09 -0000
@@ -307,7 +307,7 @@ int rt; /* set might include realtime si
 	int i, nsigs;
 	int maxsigs;
 	char *format;
-	static char outstr[256];
+	static char outstr[2048];
 
 	strcpy(outstr, s);
 	s = outstr + strlen(outstr);




More information about the Strace-devel mailing list