All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Checking two error messages
Date: Sun, 8 Mar 2020 15:42:24 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.2003081541140.2400@hadrien> (raw)
In-Reply-To: <127b687b-7139-e3b3-bc5a-13461609851c@web.de>

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

On Sun, 8 Mar 2020, Markus Elfring wrote:

> Hello,
>
> I have tried the following small script variant out again for
> the semantic patch language.
>
> @display@
> expression action;
> expression* pointer, target, x;
> identifier member, var;
> statement is;
> type t;
> @@
> (
> *t* var = pointer->member;
> |
> *pointer->member;
> |
> *target = pointer->member;
> |
> *t* var = pointer->member(...);
> |
> *pointer->member(...);
> |
> *target = pointer->member(...);
> )
>  ... when any
>      when != pointer = \( action(...) \| x \)
> *if (
> (    !pointer
> |    pointer == NULL
> )

pointer == NULL would have been sufficient (not related to the noted
problems).

>     )
>   is
>
>
> The software “Coccinelle 1.0.8-00029-ga549b9f0” (OCaml 4.10.0) reports the following error messages
> for an analysis approach on source files from “Linux next-20200306”.
>
>
> elfring@Sonne:~/Projekte/Linux/next-patched> spatch ~/Projekte/Coccinelle/janitor/show_pointer_access_before_null_check3.cocci drivers/firmware/efi/runtime-wrappers.c
> …
> Fatal error: exception File "engine/ctlcocci_integration.ml", line 361, characters 4-10: Assertion failed
> elfring@Sonne:~/Projekte/Linux/next-patched> spatch ~/Projekte/Coccinelle/janitor/show_pointer_access_before_null_check3.cocci net/core/dev.c
> …
> no position information

Thanks for the reports.  These are related to dead code and will be
addressed sooner (second case) or later (first case).

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-03-08 14:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-08 13:26 [Cocci] Checking two error messages Markus Elfring
2020-03-08 14:42 ` Julia Lawall [this message]
2020-03-11  7:56   ` [Cocci] Clarification for application of null pointer checks with SmPL Markus Elfring
2020-03-11  8:10     ` Julia Lawall
2020-03-11  8:15       ` Markus Elfring

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.21.2003081541140.2400@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.