Skip to content

Commit a721d15

Browse files
lucvoosparsecli
authored andcommitted
let "compile" not crash on bools
"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 <[email protected]> CC: Jeff Layton <[email protected]> Signed-off-by: Christopher Li <[email protected]>
1 parent 6563368 commit a721d15

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compile.c

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ int main(int argc, char **argv)
5656
char *file;
5757
struct string_list *filelist = NULL;
5858

59+
bits_in_bool = 8;
60+
5961
clean_up_symbols(sparse_initialize(argc, argv, &filelist));
6062
FOR_EACH_PTR_NOTAG(filelist, file) {
6163
struct symbol_list *list;

0 commit comments

Comments
 (0)