Skip to content

Commit 28dc578

Browse files
Merge pull request #750 from NathanJPhillips/security-scanner-support
Security scanner support
2 parents 33693d8 + 3dc10b7 commit 28dc578

File tree

163 files changed

+1279
-1030
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+1279
-1030
lines changed

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,8 @@ script:
7777
COMMAND="env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test" &&
7878
eval ${PRE_COMMAND} ${COMMAND} &&
7979
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=$FLAGS -j2 cegis.dir clobber.dir memory-models.dir musketeer.dir" &&
80+
eval ${PRE_COMMAND} ${COMMAND} &&
81+
COMMAND="make -C src clean" &&
82+
eval ${PRE_COMMAND} ${COMMAND} &&
83+
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O0 -ggdb3 -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare -DDEBUG\" -j2" &&
8084
eval ${PRE_COMMAND} ${COMMAND}

CHANGELOG

+96
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,99 @@
1+
5.7
2+
===
3+
4+
* General: All tools now support the same set of --*-check options.
5+
* General: Added --conversion-check to catch type casts that cause loss of
6+
information. Previously --(un)signed-overflow-check would report these.
7+
* CBMC: New option --symex-coverage-report to produce a Cobertura-compatible
8+
statement- and branch coverage report.
9+
* CBMC/Java: New options --java-max-vla-length, --java-unwind-enum-static,
10+
--java-cp-include-files, --lazy-methods.
11+
* GOTO-INSTRUMENT: Static loop unwinding via --unwind or via new options
12+
--unwindset, --unwindset-file, --unwinding-assertions, --partial-loops,
13+
--continue-as-loops, --log
14+
* GOTO-INSTRUMENT: New option --slice-global-inits
15+
* GOTO-INSTRUMENT: Inlining via --inline, --partial-inline, --function-inline,
16+
--no-caching
17+
* GOTO-INSTRUMENT: New options --remove-function-pointers, --model-argc-argv,
18+
--show-threaded
19+
* GOTO-CC: Additional drop-in replacement support for bcc, as, as86
20+
* GOTO-CC: GCC-style error/warning messages
21+
* GOTO-CC: New options --native-compiler and --native-linker to select the
22+
compiler/linker to be used when building combined native/goto object files.
23+
* CBMC, SYMEX, GOTO-INSTRUMENT: New option --drop-unused-functions. Removed
24+
ambiguous --show-reachable-properties.
25+
* CBMC: New option --no-built-in-assertions
26+
27+
28+
5.6
29+
===
30+
31+
Bugfixes in the C, C++, Java front-ends.
32+
33+
34+
5.5
35+
===
36+
37+
This is a major release, with significant changes. The option
38+
--all-properties is now the default; to restore the previous behaviour,
39+
use --stop-on-fail. The primary area of attention was again the Java
40+
front-end. We have furthermore added test-suite generation for branch
41+
coverage, location coverage, condition coverage, decision coverage and
42+
MC/DC.
43+
44+
45+
5.4
46+
===
47+
48+
This is a minor release, focused primarily on maintenance. The primary
49+
area of attention was again the Java front-end. We have also updated to
50+
Minisat 2.2.1.
51+
52+
53+
5.3
54+
===
55+
56+
This is a minor release, focused primarily on maintenance. The primary
57+
area of attention is the Java front-end.
58+
59+
60+
5.2
61+
===
62+
63+
This is a minor release, focused primarily on maintenance. The primary
64+
areas of attention are the full slicer, the Java frontend, test suite
65+
generation and support for the Glucose solver.
66+
67+
68+
5.1
69+
===
70+
71+
This is a minor release, focused primarily on maintenance. Support for solving
72+
floating-point problems using for SMT-LIB2 solvers without support for the
73+
floating-point theory has been added.
74+
75+
76+
5.0
77+
===
78+
79+
This is a major release, focused primarily on performance improvements.
80+
Furthermore, the support for the floating-point theory for SMT-LIB2 has been
81+
improved substantially. This release breaks compatibility with the goto-binary
82+
format used by earlier releases; i.e., you will need to rebuild your
83+
goto-binaries.
84+
85+
86+
4.9
87+
===
88+
89+
This release is primarily for maintenance purposes and does not add any major
90+
new features. The support for SMT-LIB2 solvers has been improved substantially.
91+
92+
93+
4.8
94+
===
95+
96+
197
4.7
298
===
399

COMPILING

+22-14
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,31 @@ We assume that you have a Debian/Ubuntu or Red Hat-like distribution.
3636

3737
On Red Hat/Fedora or derivates, do
3838

39-
yum install gcc gcc-c++ flex bison perl-libwww-perl patch
39+
yum install gcc gcc-c++ flex bison perl-libwww-perl patch devtoolset-6
4040

4141
Note that you need g++ version 5.2 or newer.
4242

4343
1) As a user, get the CBMC source via
4444

4545
git clone https://github.com/diffblue/cbmc cbmc-git
4646

47-
2) Do
47+
2) On Debian, do
4848

4949
cd cbmc-git/src
5050
make minisat2-download
51+
make CXX=g++-6
52+
53+
On Ubuntu, or other distributions with recent g++, do
54+
55+
cd cbmc-git/src
56+
make minisat2-download
57+
make
58+
59+
On Redhat/Fedora etc., do
60+
61+
cd cbmc-git/src
62+
make minisat2-download
63+
scl enable devtoolset-6 bash
5164
make
5265

5366

@@ -57,7 +70,7 @@ COMPILATION ON SOLARIS 11
5770
1) As root, get the necessary development tools:
5871

5972
pkg install system/header developer/lexer/flex developer/parser/bison developer/versioning/git
60-
pkg install --accept developer/gcc-5
73+
pkg install --accept developer/gcc/gcc-c++-5
6174

6275
2) As a user, get the CBMC source via
6376

@@ -79,9 +92,6 @@ COMPILATION ON SOLARIS 11
7992

8093
export LD_LIBRARY_PATH=/usr/gcc/4.9/lib
8194

82-
Do not attempt to compile with gcc-45 that comes with Solaris 11.
83-
It will mis-optimize MiniSat2.
84-
8595

8696
COMPILATION ON FREEBSD 11
8797
-------------------------
@@ -156,23 +166,21 @@ Follow these instructions:
156166
The patch removes the dependency on zlib and prevents a problem
157167
with a header file that is often unavailable on Windows.
158168

159-
2) Adjust src/config.inc for the paths to item 1).
160-
161-
3A) To compile with Cygwin, install the mingw compilers, and adjust
169+
2A) To compile with Cygwin, install the mingw compilers, and adjust
162170
the second line of config.inc to say
163171

164172
BUILD_ENV = MinGW
165173

166-
3B) To compile with Visual Studio, make sure you have at least Visual
174+
2B) To compile with Visual Studio, make sure you have at least Visual
167175
Studio version 12 (2013), and adjust the second line of config.inc to say
168176

169177
BUILD_ENV = MSVC
170178

171-
Open the Visual Studio Command prompt, and then run the make.exe
172-
from Cygwin from in there.
179+
Open the Visual Studio Command prompt, and then bash.exe -login from
180+
Cygwin from in there.
181+
182+
3) Type cd src; make - that should do it.
173183

174-
4) Type cd src; make - that should do it.
175-
Note that "nmake" is not expected to work. Use "make".
176184

177185
(Optional) A Visual Studio project file can be generated with the script
178186
"generate_vcxproj" that is in the subdirectory "scripts". The project file

doc/html-manual/cover.shtml

+10-6
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ To demonstrate the automatic test suite generation in CBMC,
149149
we call the following command and we are going to explain the command line options one by one.
150150
</p>
151151

152-
<pre><code>cbmc pid.c --cover mcdc --unwind 6 --trace --xml-ui
152+
<pre><code>cbmc pid.c --cover mcdc --unwind 6 --xml-ui
153153
</code></pre>
154154

155155
<p class="justified">
@@ -173,18 +173,22 @@ pprz >= (float)0 && pprz <= (float)(16 * 600) id="climb_pid_run.coverage.3"
173173

174174
<p class="justified">
175175
The "id" of each coverage goal is automatically assigned by CBMC. For every
176-
coverage goal, a trace (if there exists) of the program execution that
177-
satisfies such a goal is printed out in XML format, as the parameters
178-
<code>--trace --xml-ui</code> are given. Multiple coverage goals can share a
179-
trace, when the corresponding execution of the program satisfies all these
180-
goals at the same time. Each trace corresponds to a test case.
176+
coverage goal, a test suite (if there exists) that <!-- the program execution that-->
177+
satisfies such a goal is printed out in XML format, as the parameter
178+
<code>--xml-ui</code> is given. Multiple coverage goals can share a
179+
test suite, when the corresponding execution of the program satisfies all these
180+
goals at the same time. <!--Each trace corresponds to a test case.-->
181181
</p>
182182

183183
<p class="justified">
184184
In the end, the following test suites are automatically generated for testing the PID controller.
185185
A test suite consists of a sequence of input parameters that are
186186
passed to the PID function <code>climb_pid_run</code> at each loop iteration.
187187
For example, Test 1 covers the MC/DC goal with id="climb_pid_run.coverage.1".
188+
The complete output from CBMC is in
189+
<a href="pid_test_suites.xml">pid_test_suites.xml</a>, where every test suite and the coverage goals it is for
190+
are clearly described.
191+
188192
<pre><code>Test suite:
189193
Test 1.
190194
(iteration 1) desired_climb=-1.000000f, estimator_z_dot=1.000000f

0 commit comments

Comments
 (0)