Skip to content

Commit c337363

Browse files
Merge pull request #631 from peterschrammel/update-from-master
Update test-gen-support from master
2 parents 2cc423e + dcd0c52 commit c337363

File tree

217 files changed

+10580
-288
lines changed

Some content is hidden

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

217 files changed

+10580
-288
lines changed

.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:
@@ -18,7 +43,10 @@ matrix:
1843
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
1944
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
2045
env: COMPILER=g++-5
46+
47+
# Ubuntu Linux with glibc using clang++-3.7
2148
- os: linux
49+
sudo: false
2250
compiler: clang
2351
addons:
2452
apt:
@@ -34,18 +62,17 @@ matrix:
3462
- mkdir bin ; ln -s /usr/bin/clang-3.7 bin/gcc
3563
# env: COMPILER=clang++-3.7 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined,integer -fno-omit-frame-pointer"
3664
env: COMPILER=clang++-3.7
37-
- os: osx
38-
compiler: gcc
39-
env: COMPILER=g++
40-
- os: osx
41-
compiler: clang
42-
env: COMPILER=clang++
65+
4366
- env: NAME="CPP-LINT"
4467
script: scripts/travis_lint.sh || true
4568

4669
script:
4770
- if [ -L bin/gcc ] ; then export PATH=$PWD/bin:$PATH ; fi ;
48-
make -C src minisat2-download &&
49-
make -C src CXX=$COMPILER CXXFLAGS="-Wall -O2 -g -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare" -j2 &&
50-
env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test &&
51-
make -C src CXX=$COMPILER CXXFLAGS=$FLAGS -j2 cegis.dir clobber.dir memory-models.dir musketeer.dir
71+
COMMAND="make -C src minisat2-download" &&
72+
eval ${PRE_COMMAND} ${COMMAND} &&
73+
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O2 -g -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare\" -j2" &&
74+
eval ${PRE_COMMAND} ${COMMAND} &&
75+
COMMAND="env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test" &&
76+
eval ${PRE_COMMAND} ${COMMAND} &&
77+
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=$FLAGS -j2 cegis.dir clobber.dir memory-models.dir musketeer.dir" &&
78+
eval ${PRE_COMMAND} ${COMMAND}

COMPILING

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

@@ -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
234 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
1 KB
Binary file not shown.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
test.class
3+
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^.*assertion at file test.java line 26 function.*: FAILURE$
7+
\*\* 1 of 9 failed \(2 iterations\)$
8+
^VERIFICATION FAILED$
9+
--
10+
^warning: ignoring
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
class A extends Throwable {}
2+
class B extends A {}
3+
class C extends B {}
4+
class D extends C {}
5+
6+
public class test {
7+
public static void main (String arg[]) {
8+
try {
9+
D d = new D();
10+
C c = new C();
11+
B b = new B();
12+
A a = new A();
13+
A e = a;
14+
throw e;
15+
}
16+
catch(D exc) {
17+
assert false;
18+
}
19+
catch(C exc) {
20+
assert false;
21+
}
22+
catch(B exc) {
23+
assert false;
24+
}
25+
catch(A exc) {
26+
assert false;
27+
}
28+
}
29+
}
30+
241 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
875 Bytes
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
test.class
3+
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^.*assertion at file test.java line 12 function.*: FAILURE$
7+
^VERIFICATION FAILED$
8+
--
9+
^warning: ignoring
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
class A extends RuntimeException {}
2+
class B extends A {}
3+
class C extends B {}
4+
5+
public class test {
6+
static void foo() {
7+
try {
8+
A b = new A();
9+
throw b;
10+
}
11+
catch(A exc) {
12+
assert false;
13+
}
14+
}
15+
16+
public static void main (String args[]) {
17+
try {
18+
A a = new A();
19+
foo();
20+
}
21+
catch(B exc) {
22+
assert false;
23+
}
24+
}
25+
}
276 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
976 Bytes
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
test.class
3+
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^.*assertion at file test.java line 36 function.*: FAILURE$
7+
^VERIFICATION FAILED$
8+
--
9+
^warning: ignoring
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
class A extends RuntimeException {
2+
int i=1;
3+
};
4+
5+
class B extends A {
6+
};
7+
8+
public class test {
9+
static int foo(int k) {
10+
try {
11+
if(k==0)
12+
{
13+
A a = new A();
14+
throw a;
15+
}
16+
else
17+
{
18+
A b = new A();
19+
throw b;
20+
}
21+
22+
}
23+
catch(B exc) {
24+
assert exc.i==1;
25+
}
26+
return 1;
27+
}
28+
29+
30+
public static void main (String args[]) {
31+
try {
32+
A a = new A();
33+
foo(6);
34+
}
35+
catch(A exc) {
36+
assert exc.i==2;
37+
}
38+
}
39+
}
241 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
641 Bytes
Binary file not shown.
740 Bytes
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
test.class
3+
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^.*assertion at file test.java line 12 function.*: FAILURE$
7+
^VERIFICATION FAILED$
8+
--
9+
^warning: ignoring
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
class A extends RuntimeException {}
2+
class B extends A {}
3+
class C extends B {}
4+
5+
class F {
6+
void foo() {
7+
try {
8+
B b = new B();
9+
throw b;
10+
}
11+
catch(B exc) {
12+
assert false;
13+
}
14+
}
15+
}
16+
17+
public class test {
18+
public static void main (String args[]) {
19+
try {
20+
F f = new F();
21+
f.foo();
22+
}
23+
catch(B exc) {
24+
assert false;
25+
}
26+
}
27+
}
241 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
405 Bytes
Binary file not shown.
740 Bytes
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
test.class
3+
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^.*assertion at file test.java line 25 function.*: FAILURE$
7+
^VERIFICATION FAILED$
8+
--
9+
^warning: ignoring
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
class A extends RuntimeException {}
2+
class B extends A {}
3+
class C extends B {}
4+
5+
class F {
6+
void foo() {
7+
try {
8+
B b = new B();
9+
throw b;
10+
}
11+
catch(B exc) {
12+
throw exc;
13+
}
14+
}
15+
}
16+
17+
public class test {
18+
19+
public static void main (String args[]) {
20+
try {
21+
F f = new F();
22+
f.foo();
23+
}
24+
catch(B exc) {
25+
assert false;
26+
}
27+
}
28+
}
241 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
858 Bytes
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
test.class
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
class A extends RuntimeException {}
2+
class B extends A {}
3+
class C extends B {}
4+
5+
public class test {
6+
public static void main (String args[]) {
7+
try {
8+
try {
9+
C c = new C();
10+
A a = new A();
11+
}
12+
catch(C exc) {
13+
assert false;
14+
}
15+
catch(B exc) {
16+
assert false;
17+
}
18+
}
19+
catch(A exc) {
20+
assert false;
21+
}
22+
23+
}
24+
}
251 Bytes
Binary file not shown.
Binary file not shown.
1006 Bytes
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
test.class
3+
--function test.translate
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class InetAddress {}
2+
class InetSocketAddress {}
3+
4+
public class test {
5+
public String lookupPtrRecord(InetAddress address) {
6+
return "Foo";
7+
}
8+
9+
public InetAddress reverse(InetAddress address) {
10+
return address;
11+
}
12+
13+
public void translate(InetAddress address, int i) {
14+
try {
15+
String domainName = lookupPtrRecord(reverse(address));
16+
} catch (Exception e) {
17+
assert false;
18+
}
19+
}
20+
}
241 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
718 Bytes
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
test.class
3+
--function test.foo
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^.*assertion at file test.java line 18 function.*: FAILURE$
7+
^VERIFICATION FAILED$
8+
--
9+
^warning: ignoring

0 commit comments

Comments
 (0)