[cfe-dev] Null pointer to standard functions
Anders Rönnholm
Anders.Ronnholm at evidente.se
Fri Feb 27 05:02:17 PST 2015
Hello!
I would like to develop more checkers that detect when null is passed to standard functions that don't allow null.
There is already a checker that does this for functions that has non null attributes (NonNullParamChecker). Other functions such as fopen does not have that attribute so they need a separate checker unless the correct way is to add the nonnull attribute to these functions.
If they shouldn't have that attribute I propose that we write a new checker for the new functions with a checker design that uses a specification where standard functions is specified. It is specified if a function allow null. Other properties can be specified too. The checker will then use this specification to check the function calls.
I have written a proof-of-concept checker that works this way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150227/0b550305/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PassNull.diff
Type: application/octet-stream
Size: 4738 bytes
Desc: PassNull.diff
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150227/0b550305/attachment.obj>
More information about the cfe-dev
mailing list