Skip to content

Commit 52eb7ed

Browse files
authored
Merge pull request #1347 from NathanJPhillips/sss/merge-develop
Merge develop into Security Scanner Support
2 parents 33d8af7 + 660f804 commit 52eb7ed

File tree

1,307 files changed

+28285
-6341
lines changed

Some content is hidden

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

1,307 files changed

+28285
-6341
lines changed
File renamed without changes.

.travis.yml

+55-49
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,61 @@
11
language: cpp
22

3-
matrix:
3+
jobs:
44
include:
55

6+
- &linter-stage
7+
stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
8+
env: NAME="CPP-LINT"
9+
install:
10+
script: scripts/travis_lint.sh
11+
before_cache:
12+
13+
- stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
14+
env: NAME="DOXYGEN-CHECK"
15+
addons:
16+
apt:
17+
packages:
18+
- doxygen
19+
install:
20+
script: scripts/travis_doxygen.sh
21+
before_cache:
22+
23+
# Ubuntu Linux with glibc using g++-5
24+
- stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
25+
os: linux
26+
sudo: false
27+
compiler: gcc
28+
cache: ccache
29+
addons:
30+
apt:
31+
sources:
32+
- ubuntu-toolchain-r-test
33+
packages:
34+
- libwww-perl
35+
- g++-5
36+
- libubsan0
37+
before_install:
38+
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
39+
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
40+
env: COMPILER="ccache g++-5"
41+
642
# Alpine Linux with musl-libc using g++
7-
- os: linux
43+
- stage: Test different OS/CXX/Flags
44+
os: linux
845
sudo: required
946
compiler: gcc
1047
cache: ccache
1148
services:
1249
- docker
1350
before_install:
14-
- docker pull diffblue/cbmc-builder:alpine-0.0.1
51+
- docker pull diffblue/cbmc-builder:alpine-0.0.3
1552
env:
16-
- PRE_COMMAND="docker run -v ${TRAVIS_BUILD_DIR}:/cbmc -v ${HOME}/.ccache:/root/.ccache diffblue/cbmc-builder:alpine-0.0.1"
53+
- PRE_COMMAND="docker run -v ${TRAVIS_BUILD_DIR}:/cbmc -v ${HOME}/.ccache:/root/.ccache diffblue/cbmc-builder:alpine-0.0.3"
1754
- COMPILER="ccache g++"
1855

1956
# OS X using g++
20-
- os: osx
57+
- stage: Test different OS/CXX/Flags
58+
os: osx
2159
sudo: false
2260
compiler: gcc
2361
cache: ccache
@@ -26,42 +64,24 @@ matrix:
2664
- mkdir bin ; ln -s /usr/bin/gcc bin/gcc
2765
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
2866
- export PATH=/usr/local/opt/ccache/libexec:$PATH
29-
- ccache -M 1G
30-
env: COMPILER=g++
67+
env: COMPILER="ccache g++"
3168

3269
# OS X using clang++
33-
- os: osx
70+
- stage: Test different OS/CXX/Flags
71+
os: osx
3472
sudo: false
3573
compiler: clang
3674
cache: ccache
3775
before_install:
3876
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
3977
- export PATH=/usr/local/opt/ccache/libexec:$PATH
40-
- ccache -M 1G
4178
env:
4279
- COMPILER="ccache clang++ -Qunused-arguments -fcolor-diagnostics"
4380
- CCACHE_CPP2=yes
4481

45-
# Ubuntu Linux with glibc using g++-5
46-
- os: linux
47-
sudo: false
48-
compiler: gcc
49-
cache: ccache
50-
addons:
51-
apt:
52-
sources:
53-
- ubuntu-toolchain-r-test
54-
packages:
55-
- libwww-perl
56-
- g++-5
57-
- libubsan0
58-
before_install:
59-
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
60-
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
61-
env: COMPILER="g++-5"
62-
6382
# Ubuntu Linux with glibc using g++-5, debug mode
64-
- os: linux
83+
- stage: Test different OS/CXX/Flags
84+
os: linux
6585
sudo: false
6686
compiler: gcc
6787
cache: ccache
@@ -77,12 +97,13 @@ matrix:
7797
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
7898
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
7999
env:
80-
- COMPILER="g++-5"
100+
- COMPILER="ccache g++-5"
81101
- EXTRA_CXXFLAGS="-DDEBUG"
82102
script: echo "Not running any tests for a debug build."
83103

84104
# Ubuntu Linux with glibc using clang++-3.7
85-
- os: linux
105+
- stage: Test different OS/CXX/Flags
106+
os: linux
86107
sudo: false
87108
compiler: clang
88109
cache: ccache
@@ -105,7 +126,8 @@ matrix:
105126
- CCACHE_CPP2=yes
106127

107128
# Ubuntu Linux with glibc using clang++-3.7, debug mode
108-
- os: linux
129+
- stage: Test different OS/CXX/Flags
130+
os: linux
109131
sudo: false
110132
compiler: clang
111133
cache: ccache
@@ -129,27 +151,11 @@ matrix:
129151
- EXTRA_CXXFLAGS="-DDEBUG"
130152
script: echo "Not running any tests for a debug build."
131153

132-
- env: NAME="CPP-LINT"
133-
install:
134-
script: scripts/travis_lint.sh
135-
before_cache:
136-
137-
- env: NAME="DOXYGEN-CHECK"
138-
addons:
139-
apt:
140-
packages:
141-
- doxygen
142-
install:
143-
script: scripts/travis_doxygen.sh
144-
before_cache:
145-
146154
allow_failures:
147-
- env: NAME="CPP-LINT"
148-
install:
149-
script: scripts/travis_lint.sh
150-
before_cache:
155+
- <<: *linter-stage
151156

152157
install:
158+
- ccache --max-size=1G
153159
- COMMAND="make -C src minisat2-download" &&
154160
eval ${PRE_COMMAND} ${COMMAND}
155161
- COMMAND="make -C src boost-download" &&

README.md

+25
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,31 @@ and passing the resulting equation to a decision procedure.
1515

1616
For full information see [cprover.org](http://www.cprover.org/cbmc).
1717

18+
Versions
19+
========
20+
21+
Get the [latest release](https://github.com/diffblue/cbmc/releases)
22+
* Releases are tested and for production use.
23+
24+
Get the current *develop* version: `git clone https://github.com/diffblue/cbmc.git`
25+
* Develop versions are not recommended for production use.
26+
27+
Report bugs
28+
===========
29+
30+
If you encounter a problem please file a bug report:
31+
* Create an [issue](https://github.com/diffblue/cbmc/issues)
32+
33+
Contributing to the code base
34+
=============================
35+
36+
1. Fork the repository
37+
2. Clone the repository `git clone [email protected]:YOURNAME/cbmc.git`
38+
3. Create a branch from the `develop` branch (default branch)
39+
4. Make your changes (follow the [coding guidelines](https://github.com/diffblue/cbmc/blob/develop/CODING_STANDARD.md))
40+
5. Push your changes to your branch
41+
6. Create a Pull Request targeting the `develop` branch
42+
1843
License
1944
=======
2045
4-clause BSD license, see `LICENSE` file.

regression/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tests.log

regression/Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ DIRS = ansi-c \
22
cbmc \
33
cpp \
44
cbmc-java \
5+
cbmc-java-inheritance \
56
goto-analyzer \
7+
goto-diff \
68
goto-instrument \
79
goto-instrument-typedef \
8-
goto-diff \
910
invariants \
11+
strings \
12+
strings-smoke-tests \
1013
test-script \
1114
# Empty last line
1215

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
default: tests.log
2+
3+
test:
4+
@if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \
5+
../failed-tests-printer.pl ; \
6+
exit 1 ; \
7+
fi
8+
9+
tests.log: ../test.pl
10+
@if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \
11+
../failed-tests-printer.pl ; \
12+
exit 1 ; \
13+
fi
14+
15+
show:
16+
@for dir in *; do \
17+
if [ -d "$$dir" ]; then \
18+
vim -o "$$dir/*.java" "$$dir/*.out"; \
19+
fi; \
20+
done;
21+
22+
clean:
23+
find -name '*.out' -execdir $(RM) '{}' \;
24+
find -name '*.gb' -execdir $(RM) '{}' \;
25+
$(RM) tests.log
26+
27+
%.class: %.java ../../src/org.cprover.jar
28+
javac -g -cp ../../src/org.cprover.jar:. $<
29+
30+
nondet_java_files := $(shell find . -name "Nondet*.java")
31+
nondet_class_files := $(patsubst %.java, %.class, $(nondet_java_files))
32+
33+
.PHONY: nondet-class-files
34+
nondet-class-files: $(nondet_class_files)
35+
36+
.PHONY: clean-nondet-class-files
37+
clean-nondet-class-files:
38+
-rm $(nondet_class_files)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CORE
2+
test.class
3+
--function test.check
4+
^EXIT=0$
5+
^SIGNAL=0$
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class A
2+
{
3+
public int toInt()
4+
{
5+
return 12345;
6+
}
7+
}
8+
9+
class B extends A
10+
{
11+
}
12+
13+
class test
14+
{
15+
void check()
16+
{
17+
B b=new B();
18+
assert(b.toInt()==12345);
19+
}
20+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CORE
2+
test.class
3+
--function test.check
4+
^EXIT=0$
5+
^SIGNAL=0$
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
class A
2+
{
3+
protected int toInt()
4+
{
5+
return 12345;
6+
}
7+
}
8+
9+
class B extends A
10+
{
11+
public void secondary()
12+
{
13+
assert(toInt()==12345);
14+
}
15+
}
16+
17+
class test
18+
{
19+
void check()
20+
{
21+
B b=new B();
22+
b.secondary();
23+
}
24+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CORE
2+
test.class
3+
--function test.check
4+
^EXIT=0$
5+
^SIGNAL=0$
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
class Z
2+
{
3+
public int toInt()
4+
{
5+
return 12345;
6+
}
7+
}
8+
9+
class A extends Z
10+
{
11+
}
12+
13+
class B extends A
14+
{
15+
}
16+
17+
class test
18+
{
19+
void check()
20+
{
21+
B b=new B();
22+
assert(b.toInt()==12345);
23+
}
24+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CORE
2+
test.class
3+
--function test.check
4+
^EXIT=0$
5+
^SIGNAL=0$
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
class A
2+
{
3+
public int toInt()
4+
{
5+
return 12345;
6+
}
7+
}
8+
9+
class B extends A
10+
{
11+
public int toInt()
12+
{
13+
return 9999;
14+
}
15+
}
16+
17+
class Z extends B
18+
{
19+
}
20+
21+
class test
22+
{
23+
void check()
24+
{
25+
Z z=new Z();
26+
assert(z.toInt()==9999);
27+
}
28+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CORE
2+
test.class
3+
--function test.check
4+
^EXIT=0$
5+
^SIGNAL=0$

0 commit comments

Comments
 (0)