Re: [3/3] Coccinelle: pci_free_consistent: Extend when constraints for two SmPL ellipses
From: Markus Elfring
Date: Wed May 15 2019 - 08:51:12 EST
> 2, If you really plan to add the two restrictions above,
> you may need to consider this further than simply adding a "when != id = (T2)(e)" statement.
> I constructed the flollowing code snippet as a test case:
â
> Using the original SmPL, we can find a bug.
> But with your modified SmPL, we can't find the bug.
The difference is the possible exclusion of a reassignment to a local variable
in which a pointer was stored for a resource allocation.
Would you like to adjust corresponding case distinctions any further?
How many script variants will become relevant here?
Regards,
Markus