X-Git-Url: http://git.hcoop.net/bpt/coccinelle.git/blobdiff_plain/91eba41f0f6608eba3499d37eeaf609f7060fffe..951c78018cc91c58699aef95c0ccc20f34065162:/changes.txt diff --git a/changes.txt b/changes.txt index 9c5ea11..263e735 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,322 @@ -*- org -*- +* 0.1.11 + +** Language: +- Meta-identifier/function and constant could be filtered from SmPL by + regular expressions using the "~=" and "!~=" operators followed by + an OCaml regular expression (see man Str) in double quote. + +** Features: +- virtual rules, which can be referenced in depends, and set and unset + using the command-line options -D and -U +- coccicheck: a framework to check a series of SmPL files on a project + see scripts/coccicheck for more information + +** Bugfix: +- bind position variables to the correct starting position in the case of a + complex statement such as an if or while. Thanks to Derek Jones for + pointing out the problem. +- checking for non mentioned case lines in switch should be unchecked. +- space should be printed after sizeof when there are no parentheses around + the argument. Thanks to Daniel Walker for pointing out the problem. +- avoid introducing sharing in propagating ! over () in treatment of isos +- save_excursion has to handle and rethrow exceptions +- eliminate unnecessary consideration of CVS strings. Thanks to David + Young for pointing out the problem. +- completely new treatment of statement metavariables +- ++ for multiple additions +- better type checking for macro definitions +- drop regression testing in -parse_c + +* 0.1.10 + +** Language: +- declarations allowed in switch, suggested by Derek M. Jones + +** Features: +- use interval timer for timeouts. Thanks to Derek M. Jones for the + implementation. +- more flexible env.sh, thanks to Derek Jones. +- faster Python invocation +- simplify unparsing in the sgrep case + +** Bugfix: +- for glimpse there is no point to create a pattern containing a numeric + constant because glimpse doesn't index them +- add spaces after commas in function calls and function headers +- made python integration more like the ubuntu version + http://patches.ubuntu.com/by-release/extracted/debian/c/coccinelle/0.1.5dbs-2/01-system-pycaml + this fixes some memory management problems with None, True, and False +- correct labels associated with a switch in the CFG so that a statement + metavariable can match a switch. Thanks to Derek Jones for pointing out + the problem. +- keep switch pattern within switch body. Thanks to Derek Jones for + pointing out the problem. +- Allow expanded tokens to be stored in metavariables, as long as they are + not removed. But this does currently allow them in + code, which will + produce the expansion. Thanks to Ali-Erdem Ozcan for pointing out the + problem. +- improved adjustment of spacing when code removed at the beginning of a line + +* 0.1.9 + +** Language: +- allow fresh identifiers to be declared using ## such that the value mixes + both strings and previously declared metavariables + +** Features: +- better handling of expanded code containing ##. Now compute the + result. +- more precise warning message for the "'\' outside define". + Thanks to Nicholas Mc Guire for pointing out the problem. +- more precise warning message related to ifdefization. + Thanks to Derek Jones for pointing out the problem. +- we don't create any more certain files in /tmp (they may be a cause + of security problems). + Thanks to Eugeniy Meshcheryakov for pointing out the problem. +- More optimization for the case of just deleting a complete function. + Allows this to happen without tracing through all the control-flow + paths. Thanks to Francois Bissyande for pointing out the problem. +- prevent code from being added to the beginning or end of a disjunction +- more information about why a script is not applied when using -debug option +- added -no_safe_expressions option +- added -no_loops option. Ignores back edges derived from looping + constructs. This is unsafe, but perhaps useful for bug finding, as it can + be more efficient. +- for semantic matches, allow "minus" on same code with multiple + environments +- better error message for mismatch of parenthesis in column 0 with normal + parenthesis. Thanks to Derek Jones for pointing out the problem. +- allow disjunctions on function return types. Thanks to Pierre Habouzit + for pointing this out. + +** Bugfix: +- keep disjunction in the proper order for structure initialization fields +- variables declared in different places should not seem to match each + other +- drop complaints about label metavariables not being used +- drop test information from the type of an expression when the expression + is bound to a metavariable +- nests should not extend beyond the before and after code, even if the + before and after code matches the nest code +- nests should extend into conditionals that end in error exit +- take into account metavariables on "else". Thanks to Derek Jones for + pointing out the problem. +- print single quotes on generated character constants +- better typedef handling in the initialisation/affectation builtin + isomorphism, cf -test init_affect_typedef +- support disjunction of types on variable declaration +- allow @ within strings in script code. ignore // comment lines in script + code. +- don't drop + code placed after the transformed code +- drop spaces produced by removing code before semicolons +- adjusted spacing within generated code +- less verbose -sp. Thanks to Derek Jones for pointing out the problem. +- accept multiple type names in a SmPL typedef declaration. + +* 0.1.8 + +** Language: + +** Features: +- Metavariables now capture the cpp code contained within their definitions +- When - fragments are separated by ... or nest boundaries in the semantic + patch, but end up matching adjacent source code, the comments, cpp code + and whitespace that are between them are not deleted. +- better parsing of C: do expansion of macros only when needed when + have actually a parse error and also leverage the definition of macros + in the parsed file (or in a optional_standard.h file passed as a parameter). + This should reduce the need for many hardcoded definitions in standard.h +- new semantics for the -macro_file option, by default now expand macros + only when necessary. To force use the -macro_file_builtins option instead. +- a new -extract_macros command line action to help the parser. Works with + the -macro_file option. e.g. + $ ./spatch -extract_macros ~/linux > /tmp/alldefs.h + $ ./spatch -macro_file /tmp/alldefs.h -sp_file foo.cocci -dir ~/linux +- removed -D macro_file option, not consistent with what -D usually means +- reattempt to be more efficient for statement metavariables that are just + placeholders (ie, no modification, no reuse) +- triples now returned from ctl in sorted order. The main key is the + state. On the other hand, the state order does not always agree with the + order of appearance in the code. +- spatch is now less verbose on the things it does yet handle. Less confusing + for new users. +- slightly better error report. Thanks to Derek Jones for the suggestion. +- added the options -linux_spacing and -smpl_spacing. -linux_spacing + causes spatch to follow the spacing conventions of Linux, while + -smpl_spacing causes spatch to follow the spacing in the semantic patch. + -linux_spacing is the default. +- more informative error reporting for the already tagged token case. + Thanks to Erik Hovland for the suggestion. + +** Bugfix: +- better parsing of declare macro at toplevel and in structure. + cf -text xfield +- allowing back typedef names for fieldname +- better printing of else in generated code +- slightly better type inference for binary operators. +- clear out declarer names and iterator names between SmPL files (for + -testall) +- better parsing and type checking of macro type aliases. Cf -test macro_int16. + Thanks to Li Yingtong for pointing out the problem. +- make insert_virtual_positions tail rec, avoid stack overflow pb. + Thanks to Diego Liziero for pointing out the + problem. +- Better type inference for arithmetic binary operators + Thanks to Li Yingtong for pointing out the problem. +- Better type inference for constants + Thanks to Li Yingtong for pointing out the problem. +- move computing of adjacency information for semantic patches to after + application of isomorphisms, because isomorphisms can introduce "..." +- compute adjacency information for negated ... +- record with each transformation site the set of indices of the witness + trees that caused the transformation site to come about. Whitespace and + comments between remove tokens associated with disjoint witness trees is + not removed. +- correct treatment of function pointer typed parameters in the SmPL ast0 + visitor. +- better parsing error message and error recovery when comments are not ended, + when some macros have a weird body, and when some switch have a weird + Body. + Thanks to Derek Jones for pointing out the problem. +- better detection and passing of "dangerous" ifdefs, cf -test + double_switch. +- dropped the separation of decls and body in Seq. This gives better + positioning of the bindings of metavariables shared between them. + Thanks to Erik Hovland for an example that shows the problem. + +** Internals: +- supress warning in compiling ocamlsexp (warning caused by a new behavior + of cpp used internally in processing files in ocamlsexp/) + +* 0.1.7 + +** Language: +- initialize and finalize script code, cf demos/initial_final.cocci + +** Features: +- -iso_limit option to limit the depth of isomorphism application +- with the dir option, the include path is implicitly set to the "include" + subdirectory of the specified directory, if the option -I is not used. +- give a seed for the name of a fresh identifier +- better handling of cpp "constructed" identifiers as in a##b, that in + the futur will make it easier to match over those idents. + cf tests/pb_parsing_macro.c. Thanks to Ali-Erdem Ozcan for pointing + out the problem. A new "parsing hack hint" is also available: + YACFE_IDENT_BUILDER, cf standard.h. + +** Bugfix: +- drop excessive "optimization" in ctl generation for while and for loops +- allow . as the name of the directory +- for type inference for an assignment, take the type of the right-hand + side expression, not the type of the assigned variable +- allow for with a declartion in the first header element, as in C++ + (partial support) +- allow for matching against variable declarations that include only + storage, eg static, but no type at all. +- allow for matching against types that contain both short/long and int +- allow the type metavariable in the SmPL code "unsigned T" to match a T + that is a type consisting of more than one word, eg long int. +- -ifdef_to_if option made to process nested ifdefs + (partial support) + +** Internals: +- improve and fix installation process (usable on BSD) +- improve and fix testing process +- apply patches from Eugeniy Meshcheryakov +- reorganize the way we parse C identifiers, especially concatenated cpp + identifiers as in a##b. This may lead to some regressions as we may + not parse as much code as before. +- removed popl/ and popl09/ and popl related stuff from official distrib. + +* 0.1.6 + +** Language: +- the ability to add comments + +** Features: +- grouping of generated rules with -hrule option +- handling of special coccinelle comments + /* {{coccinelle:skip_start}} */ and + /* {{coccinelle:skip_end}} */ + allowing to give more hints to the C parser. + Thanks to Flavien@lebarbe.net for the idea. +- the ability to print the values of more (but not all) kinds of + metavariables from python +- new vim SmPL mode. + Thanks to Alexander Faroy. + +** Bugfix: +- consider the ident tokens also in the 2 lines before the error line for the + 10-most-problematic-parsing-errors diagnostic. +- SmPL parser allows cast as the argument of a pointer +- SmPL type checker allows enum as an array index +- Better generation of fresh metavariables names in hrule +- no more warnings about things that should be metavariables when there is + a disjunction in a function position +- bugfix in parser, better error message. + Thanks to Ali-Erdem OZCAN for the bug report. + +** Internals: + +* 0.1.5 + +** Language: +- added initialiser metavariable +- added sequences of designators in structures + +** Features: +- improved printing of the C code corresponding to metavariables +- improved printing when code (eg declarations) is removed at the beginning + of a block, and then is followed by a blank line +- slightly less verbose error reporting in parsing_hacks + +** Bugfix: +- fixed some problems with parsing SmPL code where a nest appears after a | +- better treatment of { }, form in macros wrt unparse_c +- less quiet for -parse_c +- improve parsing heuristics regarding macro statement + +** Internals: + +* 0.1.4 + +** Language: +- long long added to SmPL + +** Documentation: +- add grammar reference and spatch command line options reference + +** Features: +- can match patterns of the form unsigned T or signed T, where T is a + metavariable +- dropped the sizeof_parens isomorphism, which was made redundant by the + paren isomorphism +- simple rule generation + +** Bugfix: +- trailing , ; and ) no longer left on a line by themselves +- better treatment of error exit when the searched for code matches the + error exit condition. +- fix incorrect treatment of parentheses in test_exps that could allow + + code to be added twice +- don't ask whether iterator names and declarer names should be declared as + metavariables. +- slightly better support for expression list metavariables. +- short and long allowed for array index types in SmPL +- more restrictions on type inference for pointer arithmetic in SmPL +- allow isomorphisms to apply when + code is anywhere within all - terms +- changed order of printing const and volatile +- allow eg ... <... in plus code +- better formatting of generated if/while/etc. code +- better parse error reporting when the problem is at the end of the file + +** Internals: +- isomorphisms don't apply under signed/unsigned, to prevent the creation + of things like unsigned signed int. Need a better solution for this. + + * 0.1.3 ** Features: @@ -32,17 +349,19 @@ * 0.1.1 -** Langage: +** Language: - support for initializer at toplevel, cf -test substruct * 0.1 ** first public release of the source code: -** Features +** Language: - embeded python scripting - position +** Features + * beta ** first public release of the binary