mtag: kill an endless loop in up coming code
commita3f0ad4104480113590e42b5c3cd6ec261d48963
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 21 Feb 2018 08:36:52 +0000 (21 11:36 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 21 Feb 2018 08:36:52 +0000 (21 11:36 +0300)
treedc8e94221c155c9ea0776f3eebf0c88adc6da7ac
parent60f2a89efe3b56b355162c5da03487ef130fbde3
mtag: kill an endless loop in up coming code

Ok.  I won't lie, I'm not positive I understand what's going on here...
This doesn't affect the released code, it only affects it after I push
some other changes to smatch_modificiation_hooks.c.

The issue is that get_array_mtag() does get_implied_value().  Then when
we're trying to get the value of a conditional expression, we create a
fake stree and just reparse the code to see if we can get an implied value.
Then when we're reparsing the code, we somehow get back to wondering what
this mtag is.  So it calls get_implied_value again and we're in an endless
loop.

It feels to me like maybe there should be a generic fix for this that I'm
not seeing and that possibly this will come back to bite me again, but for
now it fixes the kernel compile.

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