Commit | Line | Data |
---|---|---|
34e49164 C |
1 | -*- org -*- |
2 | ||
55d38388 C |
3 | * upcoming/planned/todo |
4 | ** Language: | |
5 | - Semantic patch for other languages | |
6 | - Support metavariables, virtual rules and virtual identifiers | |
7 | in initialize and finalize rules | |
8 | ||
9 | ** Features: | |
10 | - New scripting languages | |
11 | ||
12 | ** Bugfix: | |
13 | - Add more information in documentation, man pages and wiki | |
14 | ||
c3e37e97 C |
15 | |
16 | * 0.2.2 | |
17 | ** Language: | |
18 | - Added ToTestExpression to iso language, see standard.iso for an | |
19 | explanation | |
20 | - Added depends on to initialize and finalize script code | |
21 | ||
22 | ** Features: | |
23 | - Update Emacs mode (cocci.el) to support 'virtual' rules and fix other | |
24 | keywords sush as 'depends on', 'using', 'disable' | |
25 | - better treatment of != 0 in isos, communtativity for ==/!= for all | |
26 | constants | |
aa721442 | 27 | - allow adding // comments and blank lines (even after cocci + code) |
c3e37e97 C |
28 | - Add support for multiple -I options |
29 | ||
30 | ** Bugfix: | |
31 | - correct interaction between virtual rules and included .cocci files | |
32 | - improvement in treatment of ! in isos, to avoid duplicating + code | |
aa721442 | 33 | - improvement in treatment of metavars as isos, to avoid duplicating + code |
c3e37e97 C |
34 | between toplevel and variable instantiation |
35 | - test expression of smpl conditional, etc no longer assumed to have type | |
36 | int | |
37 | - correct + line numbers in the patch produced when using * | |
38 | - iso constant metavariable matches an identifier whose name is all capital | |
39 | letters, eg NULL | |
40 | - allow / at the end of the name of a directory (-dir) or patch prefix | |
41 | (-patch) | |
42 | - dropped space in + code after the binding of a type metavariable that is | |
43 | a pointer type | |
44 | - better handling of . or .. in -dir name | |
45 | - allow keywords and metavariable names in identifier constraints (not sure | |
46 | keywords is very useful, though) | |
aa721442 C |
47 | - no lubtype on arguments of && and || in SmPL |
48 | - allow unknown as type for array indices in SmPL | |
49 | - support matching of static annotation on functions that are both static | |
50 | and inline | |
51 | - support ENOTDIR error in Common.lfile_exists, to allow for the case where | |
52 | an include file is in a subdirectory that exists but is an ordinary file, | |
53 | not a directory. | |
54 | - better management of unbound position variables that appear in | |
55 | constraints | |
56 | - cause python parser to skip over // comments, hoping that // is not | |
57 | meaningful inside python | |
58 | - require + on every line of a multiline comment | |
d6a55602 C |
59 | - correct calculation of line numbers when there is script code |
60 | - always annotate arguments of && || and ! as test expressions in C code. | |
c3e37e97 | 61 | |
ae4735db C |
62 | * 0.2.1 |
63 | ** Language: | |
64 | - Add virtual identifiers | |
65 | - Add coccilib.report and coccilib.trac Python modules | |
66 | - coccilib.org and coccilib.report are imported by default but not loaded | |
67 | in the current scope. | |
68 | ||
69 | ** Features: | |
70 | - Parse_error_msg now more helpful. New option -verbose_parsing for even | |
71 | more information. | |
72 | - Improve Python import handling. They are imported once during script | |
73 | initialization. | |
74 | ||
75 | ** Bugfix: | |
76 | - correct treatment of depends on with || for virtual rules | |
77 | ||
7f004419 C |
78 | * 0.2.0 |
79 | ** Language: | |
80 | ||
81 | ** Features: | |
82 | - Remove duplicated code in disjunctions | |
83 | - Better error message when grep finds nothing relevant. Thanks to Joe | |
84 | Perches for the suggestion. | |
85 | - added -keep_comments option for the unparsing of the transformed code | |
86 | - Option "-version" now also gives information about built-in | |
87 | Python binding support. | |
9f8e26f4 C |
88 | - slightly faster environment manipulation in pathological cases |
89 | - hack added to accept well-formed #define after function header | |
7f004419 C |
90 | |
91 | ** Bugfix: | |
9f8e26f4 | 92 | - Proper consideration of #define macro arguments in checking for the use |
7f004419 | 93 | of metavariables and in computing the line numbers of complex terms |
9f8e26f4 C |
94 | - Better parsing of included .cocci files |
95 | - Put included .cocci files in the right order | |
96 | - Bind position variables only once for #include | |
97 | - Fix bug in include_match that caused everything to halt when all matches | |
7f004419 | 98 | were discarded |
9f8e26f4 C |
99 | - Merge unlikely/likely iso rules under a iso rule named unlikely |
100 | - Some fixes to coccicheck rules, thanks to Andrew Lunn | |
101 | - Support groups in regular expression, thanks to Michael Stefaniuc | |
7f004419 | 102 | |
951c7801 C |
103 | * 0.1.11 |
104 | ||
105 | ** Language: | |
106 | - Meta-identifier/function and constant could be filtered from SmPL by | |
107 | regular expressions using the "~=" and "!~=" operators followed by | |
108 | an OCaml regular expression (see man Str) in double quote. | |
7f004419 C |
109 | - Virtual rules, which can be referenced in depends, and set and unset |
110 | using the command-line options -D | |
111 | - ++ for multiple additions | |
951c7801 C |
112 | |
113 | ** Features: | |
951c7801 C |
114 | - coccicheck: a framework to check a series of SmPL files on a project |
115 | see scripts/coccicheck for more information | |
116 | ||
117 | ** Bugfix: | |
118 | - bind position variables to the correct starting position in the case of a | |
119 | complex statement such as an if or while. Thanks to Derek Jones for | |
120 | pointing out the problem. | |
121 | - checking for non mentioned case lines in switch should be unchecked. | |
122 | - space should be printed after sizeof when there are no parentheses around | |
123 | the argument. Thanks to Daniel Walker for pointing out the problem. | |
124 | - avoid introducing sharing in propagating ! over () in treatment of isos | |
125 | - save_excursion has to handle and rethrow exceptions | |
126 | - eliminate unnecessary consideration of CVS strings. Thanks to David | |
127 | Young for pointing out the problem. | |
128 | - completely new treatment of statement metavariables | |
951c7801 C |
129 | - better type checking for macro definitions |
130 | - drop regression testing in -parse_c | |
131 | ||
fc1ad971 C |
132 | * 0.1.10 |
133 | ||
134 | ** Language: | |
135 | - declarations allowed in switch, suggested by Derek M. Jones | |
136 | ||
137 | ** Features: | |
138 | - use interval timer for timeouts. Thanks to Derek M. Jones for the | |
139 | implementation. | |
140 | - more flexible env.sh, thanks to Derek Jones. | |
141 | - faster Python invocation | |
142 | - simplify unparsing in the sgrep case | |
143 | ||
144 | ** Bugfix: | |
145 | - for glimpse there is no point to create a pattern containing a numeric | |
146 | constant because glimpse doesn't index them | |
147 | - add spaces after commas in function calls and function headers | |
148 | - made python integration more like the ubuntu version | |
149 | http://patches.ubuntu.com/by-release/extracted/debian/c/coccinelle/0.1.5dbs-2/01-system-pycaml | |
150 | this fixes some memory management problems with None, True, and False | |
151 | - correct labels associated with a switch in the CFG so that a statement | |
152 | metavariable can match a switch. Thanks to Derek Jones for pointing out | |
153 | the problem. | |
154 | - keep switch pattern within switch body. Thanks to Derek Jones for | |
155 | pointing out the problem. | |
156 | - Allow expanded tokens to be stored in metavariables, as long as they are | |
157 | not removed. But this does currently allow them in + code, which will | |
158 | produce the expansion. Thanks to Ali-Erdem Ozcan for pointing out the | |
159 | problem. | |
160 | - improved adjustment of spacing when code removed at the beginning of a line | |
161 | ||
978fd7e5 C |
162 | * 0.1.9 |
163 | ||
164 | ** Language: | |
165 | - allow fresh identifiers to be declared using ## such that the value mixes | |
166 | both strings and previously declared metavariables | |
167 | ||
168 | ** Features: | |
169 | - better handling of expanded code containing ##. Now compute the | |
170 | result. | |
171 | - more precise warning message for the "'\' outside define". | |
172 | Thanks to Nicholas Mc Guire for pointing out the problem. | |
173 | - more precise warning message related to ifdefization. | |
174 | Thanks to Derek Jones for pointing out the problem. | |
175 | - we don't create any more certain files in /tmp (they may be a cause | |
176 | of security problems). | |
177 | Thanks to Eugeniy Meshcheryakov for pointing out the problem. | |
178 | - More optimization for the case of just deleting a complete function. | |
179 | Allows this to happen without tracing through all the control-flow | |
180 | paths. Thanks to Francois Bissyande for pointing out the problem. | |
181 | - prevent code from being added to the beginning or end of a disjunction | |
182 | - more information about why a script is not applied when using -debug option | |
183 | - added -no_safe_expressions option | |
184 | - added -no_loops option. Ignores back edges derived from looping | |
185 | constructs. This is unsafe, but perhaps useful for bug finding, as it can | |
186 | be more efficient. | |
187 | - for semantic matches, allow "minus" on same code with multiple | |
188 | environments | |
189 | - better error message for mismatch of parenthesis in column 0 with normal | |
190 | parenthesis. Thanks to Derek Jones for pointing out the problem. | |
191 | - allow disjunctions on function return types. Thanks to Pierre Habouzit | |
192 | for pointing this out. | |
193 | ||
194 | ** Bugfix: | |
195 | - keep disjunction in the proper order for structure initialization fields | |
196 | - variables declared in different places should not seem to match each | |
197 | other | |
198 | - drop complaints about label metavariables not being used | |
199 | - drop test information from the type of an expression when the expression | |
200 | is bound to a metavariable | |
201 | - nests should not extend beyond the before and after code, even if the | |
202 | before and after code matches the nest code | |
203 | - nests should extend into conditionals that end in error exit | |
204 | - take into account metavariables on "else". Thanks to Derek Jones for | |
205 | pointing out the problem. | |
206 | - print single quotes on generated character constants | |
207 | - better typedef handling in the initialisation/affectation builtin | |
208 | isomorphism, cf -test init_affect_typedef | |
209 | - support disjunction of types on variable declaration | |
002099fc C |
210 | - allow @ within strings in script code. ignore // comment lines in script |
211 | code. | |
212 | - don't drop + code placed after the transformed code | |
213 | - drop spaces produced by removing code before semicolons | |
214 | - adjusted spacing within generated code | |
215 | - less verbose -sp. Thanks to Derek Jones for pointing out the problem. | |
216 | - accept multiple type names in a SmPL typedef declaration. | |
978fd7e5 | 217 | |
708f4980 C |
218 | * 0.1.8 |
219 | ||
220 | ** Language: | |
221 | ||
222 | ** Features: | |
223 | - Metavariables now capture the cpp code contained within their definitions | |
224 | - When - fragments are separated by ... or nest boundaries in the semantic | |
225 | patch, but end up matching adjacent source code, the comments, cpp code | |
226 | and whitespace that are between them are not deleted. | |
227 | - better parsing of C: do expansion of macros only when needed when | |
228 | have actually a parse error and also leverage the definition of macros | |
229 | in the parsed file (or in a optional_standard.h file passed as a parameter). | |
230 | This should reduce the need for many hardcoded definitions in standard.h | |
231 | - new semantics for the -macro_file option, by default now expand macros | |
232 | only when necessary. To force use the -macro_file_builtins option instead. | |
233 | - a new -extract_macros command line action to help the parser. Works with | |
234 | the -macro_file option. e.g. | |
235 | $ ./spatch -extract_macros ~/linux > /tmp/alldefs.h | |
236 | $ ./spatch -macro_file /tmp/alldefs.h -sp_file foo.cocci -dir ~/linux | |
237 | - removed -D macro_file option, not consistent with what -D usually means | |
238 | - reattempt to be more efficient for statement metavariables that are just | |
239 | placeholders (ie, no modification, no reuse) | |
240 | - triples now returned from ctl in sorted order. The main key is the | |
241 | state. On the other hand, the state order does not always agree with the | |
242 | order of appearance in the code. | |
243 | - spatch is now less verbose on the things it does yet handle. Less confusing | |
244 | for new users. | |
245 | - slightly better error report. Thanks to Derek Jones for the suggestion. | |
246 | - added the options -linux_spacing and -smpl_spacing. -linux_spacing | |
247 | causes spatch to follow the spacing conventions of Linux, while | |
248 | -smpl_spacing causes spatch to follow the spacing in the semantic patch. | |
249 | -linux_spacing is the default. | |
250 | - more informative error reporting for the already tagged token case. | |
251 | Thanks to Erik Hovland for the suggestion. | |
252 | ||
253 | ** Bugfix: | |
254 | - better parsing of declare macro at toplevel and in structure. | |
255 | cf -text xfield | |
256 | - allowing back typedef names for fieldname | |
257 | - better printing of else in generated code | |
258 | - slightly better type inference for binary operators. | |
259 | - clear out declarer names and iterator names between SmPL files (for | |
260 | -testall) | |
261 | - better parsing and type checking of macro type aliases. Cf -test macro_int16. | |
262 | Thanks to Li Yingtong for pointing out the problem. | |
263 | - make insert_virtual_positions tail rec, avoid stack overflow pb. | |
264 | Thanks to Diego Liziero <diegoliz@gmail.com> for pointing out the | |
265 | problem. | |
266 | - Better type inference for arithmetic binary operators | |
267 | Thanks to Li Yingtong for pointing out the problem. | |
268 | - Better type inference for constants | |
269 | Thanks to Li Yingtong for pointing out the problem. | |
270 | - move computing of adjacency information for semantic patches to after | |
271 | application of isomorphisms, because isomorphisms can introduce "..." | |
272 | - compute adjacency information for negated ... | |
273 | - record with each transformation site the set of indices of the witness | |
274 | trees that caused the transformation site to come about. Whitespace and | |
275 | comments between remove tokens associated with disjoint witness trees is | |
276 | not removed. | |
277 | - correct treatment of function pointer typed parameters in the SmPL ast0 | |
278 | visitor. | |
279 | - better parsing error message and error recovery when comments are not ended, | |
280 | when some macros have a weird body, and when some switch have a weird | |
281 | Body. | |
282 | Thanks to Derek Jones for pointing out the problem. | |
283 | - better detection and passing of "dangerous" ifdefs, cf -test | |
284 | double_switch. | |
285 | - dropped the separation of decls and body in Seq. This gives better | |
286 | positioning of the bindings of metavariables shared between them. | |
287 | Thanks to Erik Hovland for an example that shows the problem. | |
288 | ||
289 | ** Internals: | |
290 | - supress warning in compiling ocamlsexp (warning caused by a new behavior | |
291 | of cpp used internally in processing files in ocamlsexp/) | |
292 | ||
b1b2de81 C |
293 | * 0.1.7 |
294 | ||
295 | ** Language: | |
296 | - initialize and finalize script code, cf demos/initial_final.cocci | |
297 | ||
298 | ** Features: | |
299 | - -iso_limit option to limit the depth of isomorphism application | |
300 | - with the dir option, the include path is implicitly set to the "include" | |
301 | subdirectory of the specified directory, if the option -I is not used. | |
302 | - give a seed for the name of a fresh identifier | |
303 | - better handling of cpp "constructed" identifiers as in a##b, that in | |
304 | the futur will make it easier to match over those idents. | |
305 | cf tests/pb_parsing_macro.c. Thanks to Ali-Erdem Ozcan for pointing | |
306 | out the problem. A new "parsing hack hint" is also available: | |
307 | YACFE_IDENT_BUILDER, cf standard.h. | |
308 | ||
309 | ** Bugfix: | |
310 | - drop excessive "optimization" in ctl generation for while and for loops | |
311 | - allow . as the name of the directory | |
312 | - for type inference for an assignment, take the type of the right-hand | |
313 | side expression, not the type of the assigned variable | |
314 | - allow for with a declartion in the first header element, as in C++ | |
315 | (partial support) | |
316 | - allow for matching against variable declarations that include only | |
317 | storage, eg static, but no type at all. | |
318 | - allow for matching against types that contain both short/long and int | |
319 | - allow the type metavariable in the SmPL code "unsigned T" to match a T | |
320 | that is a type consisting of more than one word, eg long int. | |
321 | - -ifdef_to_if option made to process nested ifdefs | |
322 | (partial support) | |
323 | ||
324 | ** Internals: | |
325 | - improve and fix installation process (usable on BSD) | |
326 | - improve and fix testing process | |
327 | - apply patches from Eugeniy Meshcheryakov | |
328 | - reorganize the way we parse C identifiers, especially concatenated cpp | |
329 | identifiers as in a##b. This may lead to some regressions as we may | |
330 | not parse as much code as before. | |
331 | - removed popl/ and popl09/ and popl related stuff from official distrib. | |
332 | ||
0708f913 | 333 | * 0.1.6 |
113803cf | 334 | |
b1b2de81 C |
335 | ** Language: |
336 | - the ability to add comments | |
337 | ||
113803cf | 338 | ** Features: |
0708f913 C |
339 | - grouping of generated rules with -hrule option |
340 | - handling of special coccinelle comments | |
341 | /* {{coccinelle:skip_start}} */ and | |
342 | /* {{coccinelle:skip_end}} */ | |
343 | allowing to give more hints to the C parser. | |
344 | Thanks to Flavien@lebarbe.net for the idea. | |
0708f913 C |
345 | - the ability to print the values of more (but not all) kinds of |
346 | metavariables from python | |
347 | - new vim SmPL mode. | |
348 | Thanks to Alexander Faroy. | |
349 | ||
350 | ** Bugfix: | |
351 | - consider the ident tokens also in the 2 lines before the error line for the | |
352 | 10-most-problematic-parsing-errors diagnostic. | |
353 | - SmPL parser allows cast as the argument of a pointer | |
354 | - SmPL type checker allows enum as an array index | |
355 | - Better generation of fresh metavariables names in hrule | |
356 | - no more warnings about things that should be metavariables when there is | |
357 | a disjunction in a function position | |
358 | - bugfix in parser, better error message. | |
359 | Thanks to Ali-Erdem OZCAN <ali-erdem.ozcan@st.com> for the bug report. | |
360 | ||
361 | ** Internals: | |
362 | ||
363 | * 0.1.5 | |
364 | ||
365 | ** Language: | |
113803cf C |
366 | - added initialiser metavariable |
367 | - added sequences of designators in structures | |
0708f913 C |
368 | |
369 | ** Features: | |
113803cf C |
370 | - improved printing of the C code corresponding to metavariables |
371 | - improved printing when code (eg declarations) is removed at the beginning | |
372 | of a block, and then is followed by a blank line | |
373 | - slightly less verbose error reporting in parsing_hacks | |
374 | ||
375 | ** Bugfix: | |
376 | - fixed some problems with parsing SmPL code where a nest appears after a | | |
377 | - better treatment of { }, form in macros wrt unparse_c | |
378 | - less quiet for -parse_c | |
379 | - improve parsing heuristics regarding macro statement | |
380 | ||
381 | ** Internals: | |
382 | ||
faf9a90c C |
383 | * 0.1.4 |
384 | ||
0708f913 C |
385 | ** Language: |
386 | - long long added to SmPL | |
387 | ||
708f4980 C |
388 | ** Documentation: |
389 | - add grammar reference and spatch command line options reference | |
390 | ||
faf9a90c C |
391 | ** Features: |
392 | - can match patterns of the form unsigned T or signed T, where T is a | |
393 | metavariable | |
394 | - dropped the sizeof_parens isomorphism, which was made redundant by the | |
395 | paren isomorphism | |
396 | - simple rule generation | |
faf9a90c C |
397 | |
398 | ** Bugfix: | |
399 | - trailing , ; and ) no longer left on a line by themselves | |
400 | - better treatment of error exit when the searched for code matches the | |
401 | error exit condition. | |
402 | - fix incorrect treatment of parentheses in test_exps that could allow + | |
403 | code to be added twice | |
404 | - don't ask whether iterator names and declarer names should be declared as | |
405 | metavariables. | |
406 | - slightly better support for expression list metavariables. | |
407 | - short and long allowed for array index types in SmPL | |
408 | - more restrictions on type inference for pointer arithmetic in SmPL | |
409 | - allow isomorphisms to apply when + code is anywhere within all - terms | |
410 | - changed order of printing const and volatile | |
411 | - allow eg ... <... in plus code | |
412 | - better formatting of generated if/while/etc. code | |
413 | - better parse error reporting when the problem is at the end of the file | |
414 | ||
415 | ** Internals: | |
416 | - isomorphisms don't apply under signed/unsigned, to prevent the creation | |
417 | of things like unsigned signed int. Need a better solution for this. | |
418 | ||
708f4980 | 419 | |
91eba41f C |
420 | * 0.1.3 |
421 | ||
422 | ** Features: | |
423 | - help in building the configuration macro file. The -parse_c action | |
424 | now returns the 10 most frequent parsing errors. This give useful | |
425 | hints to extend standard.h. | |
426 | ||
427 | ** Bugfix: | |
428 | - positions no longer allowed on \(, \|, and \) | |
429 | - improved propagation of negation for isos in the presence of parens | |
430 | - convert Todos in flow graph construction to recoverable errors | |
431 | - fixed bug in treatment of when != true and when != false, to allow more | |
432 | than one of them per ... | |
433 | - improve parsing of typedef of function pointer. | |
434 | - improve typing. | |
435 | - parsing and typing support for old style C function declaration. | |
436 | - consider position variables as modifications when optimizing the | |
437 | translation into CTL of function definitions | |
438 | ||
439 | ** Internals: | |
440 | ||
485bce71 C |
441 | * 0.1.2 |
442 | ||
443 | ** Bugfix: | |
444 | - better handling of ifdef on statements in control flow graph. | |
445 | - transform files even if they do not end in .c (thanks to Vegard Nossum) | |
446 | ||
447 | ** Internals: | |
448 | - merge code of yacfe | |
449 | ||
1be43e12 C |
450 | * 0.1.1 |
451 | ||
0708f913 | 452 | ** Language: |
485bce71 | 453 | - support for initializer at toplevel, cf -test substruct |
1be43e12 | 454 | |
34e49164 C |
455 | * 0.1 |
456 | ||
457 | ** first public release of the source code: | |
458 | ||
0708f913 | 459 | ** Language: |
34e49164 C |
460 | - embeded python scripting |
461 | - position | |
462 | ||
0708f913 C |
463 | ** Features |
464 | ||
34e49164 C |
465 | * beta |
466 | ||
467 | ** first public release of the binary | |
468 | ||
469 | * alpha | |
470 | ||
471 | ** Features | |
472 | - lots of features ... look at coccinelle research papers and tutorials. |