function_hooks,db: calculate the return range based on the correct slist
commitbcdafa260cc5e7eb4cc706df685fcb618a271cda
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 3 Dec 2014 08:00:17 +0000 (3 11:00 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 3 Dec 2014 08:00:17 +0000 (3 11:00 +0300)
tree96debeae7eac33f3ae7c8c9b35de279accd8d151
parent3abf134c51f16e909abd4c3e0724af8f3dab3328
function_hooks,db: calculate the return range based on the correct slist

We should look at the return_id and pop the fake stree before calculating
the return range.  Otherwise we end up calculating it based on the wrong
stree.

This is the correct thing to do and a bugfix but there is a second bug
here that is more tricky.  If we have:

p = frob(p, xxx);

Where the return value is maybe "$0 + 4" then we end up calculating a new
return value for every entry in the database instead of having the same
return value every time.

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