[PATCH] let "compile" not crash on bools

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

 



"compile" & "compile-i386" have never been adapted to use
bits_to_bytes() and crash when processing a bool because
it doesn't find a suffix for 1-bit instructions ('b', 'w', 'l', 'q').

Sprinkling a dozen "bit_to_bytes()" and adjusting a few shifts
would fix it but letting bits_in_bool be equal to 8 is much simpler.

Note: with this patch, "compile" crashes 'only' 25 times when used
on the testsuite files, instead of 27 without it.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
CC: Jeff Layton <jlayton@xxxxxxxxxx>
---
 compile.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/compile.c b/compile.c
index 48f9c700..eeb996ab 100644
--- a/compile.c
+++ b/compile.c
@@ -56,6 +56,8 @@ int main(int argc, char **argv)
 	char *file;
 	struct string_list *filelist = NULL;
 
+	bits_in_bool = 8;
+
 	clean_up_symbols(sparse_initialize(argc, argv, &filelist));
 	FOR_EACH_PTR_NOTAG(filelist, file) {
 		struct symbol_list *list;
-- 
2.10.2

--
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