On Fri, 22 May 2015, Zied Habtoul wrote:

i want that the script compare the index to the size of the array. if the
index is superior to the size , a warning must be printed.
i don't know if coccinelle can do this.


I doubt that Coccinelle is really the right tecnique for this problem. Coccinelle can detect when there are no checks at all. But it will not detect the case where you check but on the wrong value. Coccinelle doesn't know anything about eg the values of particular variables. Maybe some other tools in the Linux kernel such as smatch or sparse would be more helpful in this case.

julia


2015-05-22 12:05 GMT+02:00 SF Markus Elfring
<[email protected]>:
      > i don't get the expected result , …

      How does it differ from your expectations?


      > the script must detect all the possible cases of the array
      size overflow.

      The goal is clear. How many software development challenges
      are you going to consider for such a purpose?

      Regards,
      Markus



_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to