>> elfring@Sonne:~/Projekte/Linux/next-patched> spatch
>> ~/Projekte/Coccinelle/janitor/show_questionable_variable_initialisation1.cocci
>> drivers/misc/lkdtm/core.c
>> …
>> exn while in timeout_function
>> Fatal error: exception Coccinelle_modules.Common.Impossible(56)
>>
>>
>> How do you think about the software situation?
>
> This problem is now fixed.
Another aspect was improved also for the Coccinelle software.
The following SmPL script variant can point source code places out for
further considerations.
@display@
binary operator bo;
expression e1, e2, e3, call;
identifier var;
statement is, es;
type t;
@@
*t var = e1;
... when != if ( \( var bo e2 \| var \) ) is else es
when != call(..., var, ...)
when exists
*var = e3
But it seems that data flow analysis would be needed to exclude remaining
false positives for such a source code search pattern.
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci