|
| 1 | +Changes since 2.1.0 release: |
| 2 | + |
| 3 | + Expanded documentation about configuring the probability values that |
| 4 | + Csmith uses to randomly generate programs. See file |
| 5 | + "doc/probabilities.txt". |
| 6 | + |
| 7 | + Added ability to generate programs that use floating-point. The use of |
| 8 | + floating-point is controlled by new command-line options --float and |
| 9 | + --no-float. The default is --no-float. Thanks to Alastair Donaldson |
| 10 | + for providing the initial implementation of this feature. |
| 11 | + |
| 12 | + Added ability to generate C++-compatible code, controlled by new |
| 13 | + command-line option --lang-cpp. Thanks to Sweta Seethamraju for |
| 14 | + contributing greatly to this feature. To generate C++-compatible code, |
| 15 | + use the command line below: |
| 16 | + csmith --lang-cpp --no-consts --no-volatiles |
| 17 | + |
| 18 | + Added two command-line options related to marking function as inline. |
| 19 | + --inline-function: enable or disable the functionality of marking a |
| 20 | + function as inline (disabled by default) |
| 21 | + --inline-function-prob <num>: set the probability of marking each |
| 22 | + function as inline, where <num> is an integer in the range [0, 100] |
| 23 | + (default is 50) |
| 24 | + |
| 25 | + Added command-line options for testing builtin functions. |
| 26 | + --builtins / --no-builtins: enable or disable invocations of builtin |
| 27 | + functions (disabled by default) |
| 28 | + --builtin-function-prob <num>: set the probability of choosing a |
| 29 | + builtin function (default is 50) |
| 30 | + --enable-builtin-kinds <k1>,<k2> / --disable-builtin-kinds <k1>,<k2>: |
| 31 | + enable or disable certain builtins. Currently, all builtins such as: |
| 32 | + "UInt; __builtin_bswap32; (UInt)" |
| 33 | + are be enabled by default. Builtins with a <kind> flag will be |
| 34 | + enabled only if "--enable-builtin-kinds <kind>" is passed. |
| 35 | + All default builtins, i.e. those without a <kind> flag, can be |
| 36 | + disabled by passing "--disable-builtin-kinds generic". |
| 37 | + See the list of builtins in file "src/Function.cpp". |
| 38 | + Thanks to Hal Finkel for helping to flesh out this feature. |
| 39 | + |
| 40 | + Removed command-line options --incr-decr-operators and |
| 41 | + --no-incr-decr-operators. Added command-line options to enable and |
| 42 | + disable use of the various operators individually. |
| 43 | + --pre-incr-operator / --no-pre-incr-operator |
| 44 | + --pre-decr-operator / --no-pre-decr-operator |
| 45 | + --post-incr-operator / --no-post-incr-operator |
| 46 | + --post-decr-operator / --no-post-incr-operator |
| 47 | + All of the operators are enabled by default. |
| 48 | + |
| 49 | + Added command-line options to enable/disable use of the unary plus |
| 50 | + operator. |
| 51 | + --unary-plus-operator (default) |
| 52 | + --no-unary-plus-operator |
| 53 | + |
| 54 | + Added command-line options to enable/disable use of int8_t and uint8_t. |
| 55 | + --int8 / --no-int8 |
| 56 | + --uint8 / --no-uint8 |
| 57 | + Both types are allowed by default. |
| 58 | + |
| 59 | + Added command-line options to allow/disallow use of const pointers. |
| 60 | + --const-pointers (default) |
| 61 | + --no-const-pointers |
| 62 | + |
| 63 | + Added command-line options to allow/disallow taking the addresses of |
| 64 | + union fields. |
| 65 | + --take-union-field-addr (default) |
| 66 | + --take-no-union-field-addr |
| 67 | + |
| 68 | + Added command-line options to allow/disallow taking the addresses of |
| 69 | + local variables. |
| 70 | + --addr-taken-of-locals (default) |
| 71 | + --no-addr-taken-of-locals |
| 72 | + |
| 73 | + Added command-line option --no-sign-char-index. When set, do not allow |
| 74 | + a variable of signed char type to be used as an array index. |
| 75 | + |
| 76 | + Added command-line option --fresh-array-ctrl-var-names. If this option |
| 77 | + is specified, then the generated program will use fresh names for array |
| 78 | + control vars rather than unique ones such as i, j, k. With this option, |
| 79 | + we can also avoid name shadowing in different local scopes. |
| 80 | + |
| 81 | + Added command-line option --no-hash-value-printf. When specified, |
| 82 | + don't emit printf on array indices when computing hash values. |
| 83 | + |
| 84 | + Added command-line option --safe-math to complement the already |
| 85 | + implemented --no-safe-math option. |
| 86 | + |
| 87 | + Added command-line option --enable-access-once to enable testing the |
| 88 | + ACCESS_ONCE macro. |
| 89 | + |
| 90 | + Added command-line option --strict-volatile-rule, which forces only one |
| 91 | + volatile access between any pair of sequence points. |
| 92 | + |
| 93 | + Added command-line options --vol-struct-union-fields and |
| 94 | + --no-vol-struct-union-fields, which enable/disable the use of volatile |
| 95 | + struct/union fields. |
| 96 | + |
| 97 | + Removed command-line option --vol-addr-file. Because we no longer rely |
| 98 | + on Csmith to generate volatile addresses, there no need to keep this |
| 99 | + option. |
| 100 | + |
| 101 | + Removed command-line option --enable-volatile-tests. Because we track |
| 102 | + volatile accesses differently now, we no longer need this option. |
| 103 | + |
| 104 | + Runtime no longer prints the final checksum if macro NO_PRINT_CHECKSUM |
| 105 | + is defined. |
| 106 | + |
| 107 | + Include "stdio.h" in generated program if command-line option |
| 108 | + --enable-volatile-tests is specified. |
| 109 | + |
| 110 | + Implemented updates for recent CompCert (ccomp). When command-line |
| 111 | + option --ccomp is specified: |
| 112 | + + Allow 64-bit data (which was previously disallowed) |
| 113 | + + Don't generate packed structs with long long fields. |
| 114 | + + Disable bitfields in unions. |
| 115 | + + Don't generate assignments from a long long to a bitfield. |
| 116 | + |
| 117 | + Fixed various bugs that would cause Csmith to crash. |
| 118 | + |
| 119 | + Fixed various bugs that would cause Csmith to generate programs with |
| 120 | + unspecified and/or defined behaviors. |
| 121 | + |
| 122 | + Moved "c_delta" C-program reducer work to a separate GitHub repository. |
| 123 | + That work was in the Csmith GitHub repository, but it was never |
| 124 | + included in an official Csmith release. If you are interested in our |
| 125 | + reducer work, see <http://embed.cs.utah.edu/creduce/>. |
| 126 | + |
1 | 127 | Changes since 2.0.0 release:
|
2 | 128 |
|
3 | 129 | Renamed environment variable `CSMITH_PATH' to be `CSMITH_HOME'.
|
4 | 130 | `HOME' is the common naming convention for variables that identify
|
5 | 131 | a single directory; `PATH' is the convention for lists of
|
6 | 132 | directories.
|
7 |
| - |
| 133 | + |
8 | 134 | By default, mark variables and functions as "static" since some
|
9 | 135 | compilers can exploit this to optimize more aggressively.
|
10 | 136 |
|
11 | 137 | Provide more controls on code generation about which variables
|
12 | 138 | should be read or written, and which variables should not be read
|
13 | 139 | or written.
|
14 | 140 |
|
15 |
| - Based on the above controls, generate generalized array-traversing |
| 141 | + Based on the above controls, generate generalized array-traversing |
16 | 142 | loops in which the array variable must be read/written while the loop
|
17 | 143 | control variable(s) must not be written.
|
18 | 144 |
|
19 |
| - Remove the modulus operations applied on array indices because all |
| 145 | + Remove the modulus operations applied on array indices because all |
20 | 146 | array accesses are guaranteed safe by the code generation mechanism.
|
21 | 147 |
|
22 | 148 | Support unions in the random programs. Allow pointers to be unions
|
23 | 149 | fields (Pointers as structure fields are yet to be supported).
|
24 |
| - |
25 |
| - When asked, intentionally create unsafe pointer dereferences for |
| 150 | + |
| 151 | + When asked, intentionally create unsafe pointer dereferences for |
26 | 152 | testing static analyzers.
|
27 |
| - |
| 153 | + |
28 | 154 | Support comma operators in the random programs. A comma expression
|
29 | 155 | is outputted as (e1 , e2) to make it more distinguishable (note the
|
30 | 156 | extra space in front of the comma).
|
31 |
| - |
| 157 | + |
32 | 158 | Support embedded assignments in the random programs.
|
33 |
| - |
| 159 | + |
34 | 160 | Support prefix/postfix ++/-- operators in the random programs.
|
35 |
| - |
| 161 | + |
36 | 162 | Provide more controls on code generation about the expression complexity
|
37 | 163 | and nested block depth.
|
38 |
| - |
39 |
| - Allow array members to be initialized to different values. |
40 |
| - |
41 |
| - add command line options: |
| 164 | + |
| 165 | + Allow array members to be initialized to different values. |
| 166 | + |
| 167 | + Add command line options: |
42 | 168 | --force-non-uniform-arrays
|
43 | 169 | --strict-const-arrays
|
44 | 170 | --null-ptr-deref-prob <N>
|
45 | 171 | --dangling-ptr-deref-prob <N>
|
46 |
| - --union-read-type-sensitive |
| 172 | + --union-read-type-sensitive |
47 | 173 | --no-union-read-type-sensitive
|
48 | 174 | --upper-expr-complexity <N>
|
49 | 175 | --max-block-depth <N>
|
50 |
| - |
| 176 | + |
51 | 177 | Quite a few bugs were fixed, many found by Pascal Cuoq using
|
52 | 178 | Frama-C to detect undefined or unspecified behaviors in programs
|
53 | 179 | generated by Csmith.
|
54 |
| - |
| 180 | + |
55 | 181 | Re-organize and clean up unnecessary code.
|
0 commit comments