* [Cocci] Checking two error messages
@ 2020-03-08 13:26 Markus Elfring
2020-03-08 14:42 ` Julia Lawall
0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2020-03-08 13:26 UTC (permalink / raw)
To: Coccinelle
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Cocci] Checking two error messages
2020-03-08 13:26 [Cocci] Checking two error messages Markus Elfring
@ 2020-03-08 14:42 ` Julia Lawall
2020-03-11 7:56 ` [Cocci] Clarification for application of null pointer checks with SmPL Markus Elfring
0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2020-03-08 14:42 UTC (permalink / raw)
To: Markus Elfring; +Cc: Coccinelle
[-- 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Cocci] Clarification for application of null pointer checks with SmPL
2020-03-08 14:42 ` Julia Lawall
@ 2020-03-11 7:56 ` Markus Elfring
2020-03-11 8:10 ` Julia Lawall
0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2020-03-11 7:56 UTC (permalink / raw)
To: Julia Lawall; +Cc: Coccinelle
>> ... when any
>> when != pointer = \( action(...) \| x \)
>> *if (
>> ( !pointer
>> | pointer == NULL
>> )
>
> pointer == NULL would have been sufficient (not related to the noted problems).
Should this detail be handled as an isomorphism?
https://github.com/coccinelle/coccinelle/blob/19ee1697bf152d37a78a20cefe148775bf4b0e0d/standard.iso#L134
>> 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).
I am curious on further collateral evolution.
Would you like to discuss any extensions for the affected software areas
(besides the mentioned error messages)?
Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Cocci] Clarification for application of null pointer checks with SmPL
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
0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2020-03-11 8:10 UTC (permalink / raw)
To: Markus Elfring; +Cc: Coccinelle
On Wed, 11 Mar 2020, Markus Elfring wrote:
> >> ... when any
> >> when != pointer = \( action(...) \| x \)
> >> *if (
> >> ( !pointer
> >> | pointer == NULL
> >> )
> >
> > pointer == NULL would have been sufficient (not related to the noted problems).
>
> Should this detail be handled as an isomorphism?
> https://github.com/coccinelle/coccinelle/blob/19ee1697bf152d37a78a20cefe148775bf4b0e0d/standard.iso#L134
Yes.
julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Cocci] Clarification for application of null pointer checks with SmPL
2020-03-11 8:10 ` Julia Lawall
@ 2020-03-11 8:15 ` Markus Elfring
0 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2020-03-11 8:15 UTC (permalink / raw)
To: Julia Lawall; +Cc: Coccinelle
>>> pointer == NULL would have been sufficient (not related to the noted problems).
>>
>> Should this detail be handled as an isomorphism?
>> https://github.com/coccinelle/coccinelle/blob/19ee1697bf152d37a78a20cefe148775bf4b0e0d/standard.iso#L134
>
> Yes.
Unfortunately, I might stumble still on difficulties for the understanding of desired
and actually observed software behaviour (because of remaining open issues).
Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-03-11 8:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-08 13:26 [Cocci] Checking two error messages Markus Elfring
2020-03-08 14:42 ` Julia Lawall
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
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).