Understanding Coccinelle

The Coccinelle Semantic Patch Language (SmPL) allows for reliable and rapid semantic-oriented code transformation for massive and rapidly evolving libraries.

test.coccitest.cocci
1
2
3
4
5
6
7
8
9
@@
expression E;
identifier ptr;
@@

-ptr = alloca(E);
+ptr = malloc(E);
+if (ptr == NULL)
+ return 1;

Code Coverage

Code coverage is a code instrumentation and data collection technique that describes the degree at which an application’s source code is run with respect to test suites.

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×