Re: coccinelle: also catch kzfree() issues

From: Julia Lawall
Date: Tue Feb 16 2016 - 15:17:58 EST




On Tue, 16 Feb 2016, SF Markus Elfring wrote:

> >> @free@
> >> +identifier kfree =~ "kz?free";
> >
> > Thanks for the suggestions. However, the regular expression is not such a
> > good idea.
>
> How much is such a SmPL constraint still usable then?
>
>
> > Coccinelle doesn't make any optimizations based on regulat expressions.
>
> Where can your software optimise the source code search?

When the name appears explicitly in the matching code, Coccinelle will
parse and process only files that contain that name.

julia

>
>
> > It would be better to put a disjunction with kfree and kzfree explicitly,
> > as in the other cases.
>
> What are the circumstances for corresponding benefits?
>
> Regards,
> Markus
>