[PATCH] Re: Sparse just seg faulted on me!

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

 



> fs/ntfs/sysctl.c:38:15: error: undefined identifier 'CTL_UNNUMBRED'
Sparse left empty ctype when error happen. Sparse should skip
the expand_symbol() at all if error happen. 

Please try this patch:

Fix the segfault when initializer has unknown symbol

Signed-Off-By: Christopher Li <sparse@xxxxxxxxxxx>

Index: sparse/expand.c
===================================================================
--- sparse.orig/expand.c	2007-02-14 09:28:57.000000000 -0800
+++ sparse/expand.c	2007-02-14 09:44:59.000000000 -0800
@@ -872,7 +872,7 @@ static void verify_nonoverlapping(struct
 	struct expression *b;
 
 	FOR_EACH_PTR(*list, b) {
-		if (a && a->ctype->bit_size && bit_offset(a) == bit_offset(b)) {
+		if (a && a->ctype && a->ctype->bit_size && bit_offset(a) == bit_offset(b)) {
 			sparse_error(a->pos, "Initializer entry defined twice");
 			info(b->pos, "  also defined here");
 			return;
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux