function_ptrs: allow function pointers to be stored to ulong struct members
commit5fe8df0add883597c317b47e4fe405804c7feb59
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Oct 2017 14:48:02 +0000 (4 17:48 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Oct 2017 14:48:38 +0000 (4 17:48 +0300)
tree7f0ecef9e7aeaf17a840b2fb45f8db44ba48b542
parent3b79419fbd357a899b6a9054ea5022aae6201f71
function_ptrs: allow function pointers to be stored to ulong struct members

Normally function pointers are declared as function pointers and that's
great.  But sometimes we declare them as void pointers and I guess that's
fine too.  But then sometimes there are the real programming heroes who
use unsigned long values to hold function pointers...

It turns out that before Smatch would look up the type of the right hand
side and if it was a function pointer then it would safe the link between
function and pointer or function pointer and function pointer.

When you try to handle void pointers and unsigned long pointers, then you
have to look up in the database if the right hand side is a function
pointer.  You can just rely on C types.

I worry that this change has caused a 50% slowdown so now a 2 hour build
takes 3 hours?  But perhaps it was a different change...  My
smatch_db.sqlite file has grown to 21GB.

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