segfault on switch() + bitwise combo

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

 



It triggers by checking with -Wbitwise on drivers/net/wireless/ipw2100.c
and net/sctp/sm_make_chunk.c

Reduced testcase:
-----------------------------------------------------
     1	typedef int __attribute__((bitwise)) A;
     2	
     3	void f(A a)
     4	{
     5		switch (a & 1) {
     6		case 0:
     7			break;
     8		}
     9	}

$ sparse -Wbitwise 1.c
1.c:5:12: error: incompatible types for operation (&)
Segmentation fault
-----------------------------------------------------
Recently added is_enum_type() call at evaluate.c:2670 gets NULL pointer.

-
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