[cfe-dev] Null pointer to standard functions

David Blaikie dblaikie at gmail.com
Fri Feb 27 09:19:11 PST 2015


Would it be easier/nicer to add the attribute to the standard library? (The
attribute is supported by GCC, I believe, so it wouldn't be a matter of
just adding it for Clang's sake)

On Fri, Feb 27, 2015 at 5:02 AM, Anders Rönnholm <
Anders.Ronnholm at evidente.se> wrote:

>  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.
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150227/eb6ce1e3/attachment.html>


More information about the cfe-dev mailing list