Skip to content

Commit c4c75da

Browse files
Merge pull request #656 from NathanJPhillips/security-scanner-support
Merge master into Security scanner support
2 parents 749264b + 8723d57 commit c4c75da

File tree

275 files changed

+12820
-628
lines changed

Some content is hidden

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

275 files changed

+12820
-628
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Local files generated by IDEs
2+
.vs/*
23
.vscode/*
4+
~AutoRecover.*
5+
*.sln
6+
*.vcxproj*
7+
scripts/__pycache__/*
8+
src/goto-analyzer/taint_driver_scripts/.idea/*
9+
/*.config
10+
/*.creator
11+
/*.creator.user
12+
/*.files
13+
/*.includes
314

415
# compilation files
516
*.lo

.travis.yml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,35 @@
11
language: cpp
22

3-
sudo: false
4-
53
matrix:
64
include:
5+
6+
# Alpine Linux with musl-libc using g++
7+
- os: linux
8+
sudo: required
9+
compiler: gcc
10+
services:
11+
- docker
12+
before_install:
13+
- docker pull diffblue/cbmc-builder:alpine
14+
env:
15+
- PRE_COMMAND="docker run -v ${TRAVIS_BUILD_DIR}:/cbmc diffblue/cbmc-builder:alpine"
16+
- COMPILER=g++
17+
18+
# OS X using g++
19+
- os: osx
20+
sudo: false
21+
compiler: gcc
22+
env: COMPILER=g++
23+
24+
# OS X using clang++
25+
- os: osx
26+
sudo: false
27+
compiler: clang
28+
env: COMPILER=clang++
29+
30+
# Ubuntu Linux with glibc using g++-5
731
- os: linux
32+
sudo: false
833
compiler: gcc
934
addons:
1035
apt:
@@ -20,7 +45,10 @@ matrix:
2045
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
2146
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
2247
env: COMPILER=g++-5
48+
49+
# Ubuntu Linux with glibc using clang++-3.7
2350
- os: linux
51+
sudo: false
2452
compiler: clang
2553
addons:
2654
apt:
@@ -38,18 +66,17 @@ matrix:
3866
- mkdir bin ; ln -s /usr/bin/clang-3.7 bin/gcc
3967
# env: COMPILER=clang++-3.7 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined,integer -fno-omit-frame-pointer"
4068
env: COMPILER=clang++-3.7
41-
- os: osx
42-
compiler: gcc
43-
env: COMPILER=g++
44-
- os: osx
45-
compiler: clang
46-
env: COMPILER=clang++
69+
4770
- env: NAME="CPP-LINT"
4871
script: scripts/travis_lint.sh || true
4972

5073
script:
5174
- if [ -L bin/gcc ] ; then export PATH=$PWD/bin:$PATH ; fi ;
52-
make -C src minisat2-download &&
53-
make -C src CXX=$COMPILER CXXFLAGS="-Wall -O2 -g -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare" -j2 &&
54-
env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test &&
55-
make -C src CXX=$COMPILER CXXFLAGS=$FLAGS -j2 cegis.dir clobber.dir memory-models.dir musketeer.dir
75+
COMMAND="make -C src minisat2-download" &&
76+
eval ${PRE_COMMAND} ${COMMAND} &&
77+
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O2 -g -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare\" -j2" &&
78+
eval ${PRE_COMMAND} ${COMMAND} &&
79+
COMMAND="env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test" &&
80+
eval ${PRE_COMMAND} ${COMMAND} &&
81+
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=$FLAGS -j2 cegis.dir clobber.dir memory-models.dir musketeer.dir" &&
82+
eval ${PRE_COMMAND} ${COMMAND}

COMPILING

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ environments:
1010

1111
- Solaris 11
1212

13-
- FreeBSD 10 or 11
13+
- FreeBSD 11
1414

1515
- Cygwin
16-
(We recommend the i686-pc-mingw32-g++ cross compiler, version 4.7 or above.)
16+
(We recommend the i686-pc-mingw32-g++ cross compiler, version 5.4 or above.)
1717

1818
- Microsoft's Visual Studio version 12 (2013), version 14 (2015),
1919
or version 15 (older versions won't work)
@@ -29,16 +29,16 @@ COMPILATION ON LINUX
2929
We assume that you have a Debian/Ubuntu or Red Hat-like distribution.
3030

3131
0) You need a C/C++ compiler, Flex and Bison, and GNU make.
32-
The GNU Make needs to be version 3.81 or higher. On Debian-like
33-
distributions, do
32+
The GNU Make needs to be version 3.81 or higher.
33+
On Debian-like distributions, do
3434

35-
apt-get install g++ gcc flex bison make git libz-dev libwww-perl patch libzip-dev
35+
apt-get install g++-6 gcc flex bison make git libwww-perl patch
3636

3737
On Red Hat/Fedora or derivates, do
3838

3939
yum install gcc gcc-c++ flex bison perl-libwww-perl patch
4040

41-
Note that you need g++ version 4.9 or newer.
41+
Note that you need g++ version 5.2 or newer.
4242

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

@@ -48,8 +48,6 @@ We assume that you have a Debian/Ubuntu or Red Hat-like distribution.
4848

4949
cd cbmc-git/src
5050
make minisat2-download
51-
make libzip-download zlib-download
52-
make libzip-build
5351
make
5452

5553

@@ -59,7 +57,7 @@ COMPILATION ON SOLARIS 11
5957
1) As root, get the necessary development tools:
6058

6159
pkg install system/header developer/lexer/flex developer/parser/bison developer/versioning/git
62-
pkg install --accept developer/gcc-49
60+
pkg install --accept developer/gcc-5
6361

6462
2) As a user, get the CBMC source via
6563

@@ -85,8 +83,8 @@ COMPILATION ON SOLARIS 11
8583
It will mis-optimize MiniSat2.
8684

8785

88-
COMPILATION ON FREEBSD 10/11
89-
----------------------------
86+
COMPILATION ON FREEBSD 11
87+
-------------------------
9088

9189
1) As root, get the necessary tools:
9290

@@ -126,8 +124,6 @@ Follow these instructions:
126124

127125
cd cbmc-git/src
128126
make minisat2-download
129-
make libzip-download zlib-download
130-
make libzip-build
131127
make
132128

133129

Binary file not shown.

regression/cbmc-java/NullPointer3/NullPointer3.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ public static void main(String[] args)
44
{
55
throw null; // NULL pointer dereference
66
}
7-
87
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
CORE
22
NullPointer3.class
3-
--pointer-check --stop-on-fail
3+
--pointer-check
44
^EXIT=10$
55
^SIGNAL=0$
6-
^ file NullPointer3.java line 5 function java::NullPointer3.main:\(\[Ljava/lang/String;\)V bytecode_index 1$
6+
^.*Throw null: FAILURE$
77
^VERIFICATION FAILED$
88
--
99
^warning: ignoring

regression/cbmc-java/VarLengthArrayTrace1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ VarLengthArrayTrace1.class
33
--trace
44
^EXIT=10$
55
^SIGNAL=0$
6-
dynamic_3_array\[1l\]=10
6+
dynamic_3_array\[1.*\]=10
77
--
88
^warning: ignoring
99
assignment removed
351 Bytes
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
public class classtest1
2+
{
3+
static void main(String[] args)
4+
{
5+
g(classtest1.class);
6+
}
7+
static void g(Object c)
8+
{
9+
assert true;
10+
}
11+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
classtest1.class
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring

0 commit comments

Comments
 (0)