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