From 8d840ca8003ae5a714d195d83bb23e1159abe827 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 7 Jul 2015 11:16:09 +0300 Subject: [PATCH] flow: ignore arrays with over a 1000 elements Handling massive arrays causes a terrible slow down. Smatch is crap at handling arrays so who are we kidding here by pretending this is worth while? Signed-off-by: Dan Carpenter --- smatch_flow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/smatch_flow.c b/smatch_flow.c index ea8dccb5..f23b4f4e 100644 --- a/smatch_flow.c +++ b/smatch_flow.c @@ -1237,6 +1237,9 @@ static void fake_element_assigns_helper(struct expression *array, struct express struct symbol *type; int idx; + if (ptr_list_size((struct ptr_list *)expr_list) > 1000) + return; + idx = 0; FOR_EACH_PTR(expr_list, tmp) { if (tmp->type == EXPR_INDEX) { -- 2.11.4.GIT