>> >> Anyway, to work this around, I run spatch with -timeout 120. > > > Yes, good point. Still if there is some file of interest and some rule on > which it times out, please let me know. > > I know that in at least some kernels there were some files with enormous > array initializers that Coccinelle had trouble parsing. But running such > files on Coccinelle is not useful either. > > The best thing to do is use the timeout, and then look through your standard > output for EXN followed by Timeout and see if you care about > running the given semantic patch on any of those files. > > julia
Thank you very much for all the answers. I wanted to post answer after Artem's, but then Julia expressed my exact thoughts, so there's no point in repeating them. I will follow your suggestions. While on the list ... In some pieces of code I've found incorrect patterns like that: if (x != 5 || x != 6) I've came up with the following cocci file: @ expression x, y, z; @ - x != y || ... x != z [ or x != y || ... || x != z, writing from memory] + x != y && x != z is that the best I could do? As you can see, it generates incorrect patches when there are multiple ||. Moreover, it generates incorrect patches for: 0 != x || 0 != y It's not something I can't live with, but maybe there's better alternative? Something more ... general? I've looked through sample patch sets and couldn't find anything relevant. I could write constant y, z;, but that would prevent me from detecting if (x != a(5) || x != a(6)). Best regards, Robert _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
