mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Denis Efremov <efremov@linux.com>,
	kernel-janitors@vger.kernel.org, cocci@systeme.lip6.fr
Cc: linux-kernel@vger.kernel.org,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Julia Lawall <julia.lawall@lip6.fr>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Nicolas Palix <nicolas.palix@imag.fr>
Subject: Re: [RFC PATCH] coccinelle: check for integer overflow in binary search
Date: Thu, 5 Sep 2019 16:23:35 +0200	[thread overview]
Message-ID: <a9fabfbe-d75e-ef40-c5e6-946c52344308@web.de> (raw)
In-Reply-To: <20190904221223.5281-1-efremov@linux.com>

> +@@
> +(
> + while (\(…\)) {
> + }

It seems that compound statements are mainly checked for
control flow statements by this source code search approach
so far.
Would you like to handle also single statements (without the
curly brackets)?
(Will additional SmPL disjunctions be needed then?)


> +statement S;
> +|
> + for (...; \(…\);
> +      m = \(…\)) S

* Can the metavariable “S” look nicer on a separate line?

* Should assignments be taken into account for more variables?


> +|
> + for (...; \(…\); ...) {
> + }
> +)

I find the shown case distinction incomplete.
Will loop initialisations trigger further SmPL development challenges?

Regards,
Markus

      parent reply	other threads:[~2019-09-05 14:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 22:12 Denis Efremov
2019-09-05  6:20 ` Julia Lawall
2019-09-05  7:36   ` Denis Efremov
2019-09-05  7:51     ` Julia Lawall
2019-09-05 12:32 ` Markus Elfring
2019-09-05 14:23 ` Markus Elfring [this message]

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=a9fabfbe-d75e-ef40-c5e6-946c52344308@web.de \
    --to=markus.elfring@web.de \
    --cc=Gilles.Muller@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=efremov@linux.com \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=nicolas.palix@imag.fr \
    --cc=yamada.masahiro@socionext.com \
    /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

Powered by JetHome