> Coccinelle doesn't do its transformation on the fly. It first matches and
> then transforms. If you make a pattern like:
> - foo();
> + bar();
I understand this simple pattern easily. I guess that "problems" start when we
try the specification of a patch with SmPL for the general pattern of error
detection and eventually missed exception handling.
> If you mean something else, perhaps you can give a concrete example.
Well, I try it again where I see difficulties and corresponding challenges.
I would like to put on the emergency brake at source code places even if I do
know the concrete function.
1. How should update candidates be filtered from the current source file?
- @function_name@(...)
{
... /* Where is a return value not used as expected? */
}
2. Where should the corresponding source code adjustment be specified?
+ @context@ exit(errno);
I would like to insert an "after advice" only if some known preconditions are
fulfilled.
http://en.wikipedia.org/wiki/Aspect-oriented_programming#AspectJ.27s_join-point_model
http://research.msrg.utoronto.ca/ACC/Tutorial#A_Reusable_Aspect_for_Memory_All
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)