On Mon, 26 Aug 2019, Markus Elfring wrote: > > I don't know what you are trying to do. > > I am trying another software analysis approach out for the presentation > of null pointer usage. > > Jia-Ju Bai contributed patches based on analysis results from > the tool “STCheck” by the OSLAB group of the Tsinghua University. > Some corresponding improvements are in the review queue. > > A specific script is available also for the semantic patch language. > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/null/deref_null.cocci?id=a55aa89aab90fae7c815b0551b07be37db359d76 > > Can this SmPL script become able to point remaining update candidates out > in similar ways? STCheck does interprocedural analysis, and has some features for path sensitivity. I haven't looked at these specific reports in detail, but in general, the kinds of bugs found by STCheck may be difficult or inconvenient to find with Coccinelle. On the other hand, STCheck doesn't have a particularly friendly language for specifying rules, at least not for the moment. julia > > Examples for further considerations: > * fs: xfs: Fix possible null-pointer dereferences in xchk_da_btree_block_check_sibling() > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/fs/xfs/scrub/dabtree.c?id=afa1d96d1430c2138c545fb76e6dcb21222098d4 > https://lore.kernel.org/lkml/20190729032401.28081-1-baijiaju1990@gmail.com/ > https://lore.kernel.org/patchwork/patch/1106628/ > https://lkml.org/lkml/2019/7/28/344 > > * scsi: libiscsi: Fix possible null-pointer dereferences in iscsi_conn_get_addr_param() > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/scsi/libiscsi.c?id=a55aa89aab90fae7c815b0551b07be37db359d76#n3455 > https://lore.kernel.org/lkml/20190729091339.30815-1-baijiaju1990@gmail.com/ > https://lore.kernel.org/patchwork/patch/1106725/ > https://lkml.org/lkml/2019/7/29/228 > > Regards, > Markus >