mtag: update the mtag when it's set using a pointer
commit345ae545308a46ecaac6b4bbd9c1ad11308a5936
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 12 Mar 2019 08:32:12 +0000 (12 11:32 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 12 Mar 2019 08:32:12 +0000 (12 11:32 +0300)
tree9d4e007dd65c0176270341608f76385c82fc1709
parent071ff77864a621c9a4bfc9768190cf110c804bc4
mtag: update the mtag when it's set using a pointer

Say we have:

int *p = &global;

*p = 42;

Then the original code wasn't updating global to say that it could be 42.
We need to look up the implied value of *p and find that it's an mtag and
update the mtag.

I had to create the get_implied_value_low_overhead() function because
creating fake cur_stree() stuff, generates more states and causes us to do
more mtag updates.  So we end up entering a forever recursive loop.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch.h
smatch_math.c
smatch_mtag_data.c