From b1d5ddd1fc12da0e2876a97d0c2943e4b124d4de Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 16 Nov 2010 20:45:44 +0300 Subject: [PATCH] temporary hack to solve crashing bug in fs/reiserfs/journal.o It was crashing because there was a function definition not at the top of the file which didn't have parameter names specified. Signed-off-by: Dan Carpenter --- smatch_buf_size.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/smatch_buf_size.c b/smatch_buf_size.c index 6405fbce..35671978 100644 --- a/smatch_buf_size.c +++ b/smatch_buf_size.c @@ -53,6 +53,16 @@ static int db_callback(void *unused, int argc, char **argv, char **azColName) i = 0; FOR_EACH_PTR(cur_func_sym->ctype.base_type->arguments, arg) { + /* + * this is a temporary hack to work around a bug (I think in sparse?) + * 2.6.37-rc1:fs/reiserfs/journal.o + * If there is a function definition without parameter name found + * after a function implementation then it causes a crash. + * int foo() {} + * int bar(char *); + */ + if (arg->ident->name < (char *)100) + continue; if (i == param && arg->ident->name) { set_state(my_size_id, arg->ident->name, arg, alloc_state_num(size)); } -- 2.11.4.GIT