cocci.systeme.lip6.fr archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Kees Cook <keescook@chromium.org>,
	Coccinelle <cocci@systeme.lip6.fr>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>
Subject: Re: [Cocci] Checking the application of a SmPL disjunction for a function call addition
Date: Sat, 29 Aug 2020 13:11:43 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2008291311160.3629@hadrien> (raw)
In-Reply-To: <2a6a3871-610b-07ad-40d5-5530c18d3c21@web.de>

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]



On Sat, 29 Aug 2020, Markus Elfring wrote:

> >> @replacement@
> >> identifier array, instance, size;
> >> type T;
> >> @@
> >> (
> >> -sizeof(T)
> >> |
> >> -sizeof(*instance->array)
> >> )
> >>  *
> >> +flex_array_size(instance, array,
> >>                  instance->size
> >> +               )
> >
> > This semantic patch will fail if the sizeof(T) option is matched, becuse
> > then it won't be able to create the + code, since it won't know what array
> > should be.
>
> Will this information trigger further consequences for the clarification
> of the topic “[RFC PATCH] coccinelle: api: add flex_array_size.cocci script”?
> https://lore.kernel.org/cocci/20200828163134.496386-1-efremov@linux.com/
> https://systeme.lip6.fr/pipermail/cocci/2020-August/008169.html

As far as I can see, in that semantic patch, array is always inherited
from a previous rule.

julia

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2020-08-29 11:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-29  8:25 [Cocci] Checking the deletion of a multiplication operator with SmPL Markus Elfring
2020-08-29  9:16 ` Julia Lawall
2020-08-29 11:02   ` [Cocci] Checking the application of a SmPL disjunction for a function call addition Markus Elfring
2020-08-29 11:11     ` Julia Lawall [this message]
2020-08-29 11:14       ` Markus Elfring
2020-08-29 11:45         ` Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2008291311160.3629@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=gustavoars@kernel.org \
    --cc=keescook@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).