db: preserve unmerged states in the ->possible better
commit49c240a3d11c03a1e4fc9ffedb820ed810943f87
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 21 Nov 2013 13:10:38 +0000 (21 16:10 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 21 Nov 2013 13:10:38 +0000 (21 16:10 +0300)
tree55a4c3ed2d58f64df830c4cc0318e5ab4a6de6cc
parent8339dfccaaec2358091ff445870e7d420dfea651
db: preserve unmerged states in the ->possible better

smatch_db.c uses the ->possible list to see places where a variable was
set.

The problem is that not all the places were recorded in a ->possible list.
The ->possible list was only saving it if it hadn't been set to that same
value before.  This meant that some return values were skipped.

Once I tried to store everything then I started using too much memory.  The
work around is only to save the extra ->possible states for SMATCH_EXTRA
and to cap it at 100 which is the limit the smatch_db.c code was already
using.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_db.c
smatch_slist.c
smatch_slist.h