On Tue, Sep 30, 2014 at 10:53:29PM +0200, Silvan Jegen wrote: > On Tue, Sep 30, 2014 at 12:14:29AM +0300, Dan Carpenter wrote: > > On Mon, Sep 29, 2014 at 08:42:23PM +0200, Silvan Jegen wrote: > > > > Currently it only stores things like "s32min-s32max[$0 + $1]" but it > > > > needs to be able to store "s32min-s32max[$0->len + $1]". > > > > > > That means I will just go and rerun smatch on the kernel then! :) > > > > > > > You need to build the database first, to experience any of the new > > goodness. The command is: > > > > ~/progs/smatch/devel/smatch_scripts/build_kernel_data.sh > > > > It takes a few hours some 15-20GB but building the DB is so worth it > > though. The results will be more accurate since it has cross function > > information. You can also use the > > ~/progs/smatch/devel/smatch_data/db/smdb.py program to see how a > > function is called. Also where a data type is allocated. Which kinds > > of values are stored in a particular struct member. Loads of > > interesting stuff. :) > > > > I don't think I've ever had any real feedback from people using the > > cross function db. Let me know how it goes. > > I ran the build_kernel_data.sh script from within the linux source tree > and ended up with a 7GB warns.txt file. I can run smdb.py in the same > directory as the warns.txt file adding a random kernel function name as > an argument but the script does not seem to return anything. > Oh. It should have created a smatch_db.sqlite file as well. I suspect you need to install some more packages. Try installing sqlite3 and libdbd-sqlite3-perl. Then run ~/progs/smatch/devel/smatch_data/db/create_db.sh -p=kernel warns.txt That's the last line of the build_knerel_data.sh script. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe smatch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html