db: fix slow down caused by recursive function calls
commit9a753b101ace751eee01a60510112dbedc6d573a
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Mar 2013 07:05:37 +0000 (25 10:05 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Mar 2013 07:05:37 +0000 (25 10:05 +0300)
tree0e8b7093bb1e11d4a119b5e43545e9b5c9fb8764
parent1d7c469bd26381adca964814d2a1086b82c3a90c
db: fix slow down caused by recursive function calls

If you build the database over and over then it builds longer and longer
call trees.  The problem is that if you have a recursive call then it
starts storing stuff like:

$$->parent->parent->parent->parent->parent->foo

And pretty soon the number of states is unmanageable.  I stop this by
limitting the state name size to 80.  80 is from testing and everything
larger than that was garbage.  Probably that's too generous already...

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