[PATCH] [SPARSE] increase MAXNEST constant

From: Arnd Bergmann (arnd@arndb.de)
Date: Sat Jun 21 2003 - 06:53:43 EST


The MAXNEST constant in sparse is currently too small for
checking most of the kernel files. The deepest nesting
I found in the kernel is 25, so MAXNEST=32 should probably
be sufficient. It would be nice to check overruns here,
but I did not know where to best do it.

The problem is hidden when sparse is compiled with gcc-3.2
or earlier, but causes segmentation faults with gcc-3.3.

        Arnd <><

===== pre-process.c 1.65 vs edited =====
--- 1.65/pre-process.c Wed Jun 11 01:03:25 2003
+++ edited/pre-process.c Sat Jun 21 13:26:03 2003
@@ -28,7 +28,7 @@
 int verbose = 0;
 int preprocessing = 0;
 
-#define MAXNEST (16)
+#define MAXNEST (32)
 static int true_nesting = 0;
 static int false_nesting = 0;
 static struct token *unmatched_if = NULL;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 23 2003 - 22:00:35 EST