Re: [Cocci] Checking two error messages

2020-03-08 Thread Julia Lawall
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___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


[Cocci] Checking two error messages

2020-03-08 Thread Markus Elfring
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
)
)
  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


Is such information worth for further clarification?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci