Skip to content

Merge master into Security scanner support #656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
002e94b
Factor out fresh symbol generation
smowton Feb 10, 2017
1134248
compute dominators per function in dependence graph
danpoe Feb 1, 2017
21b049e
marked slice16 as KNOWNBUG for now
danpoe Feb 18, 2017
bc96ff4
Remove an unnecessary loop over all instructions from flow insensitiv…
Feb 28, 2017
b71febf
Fix similar issues in other places in pointer-analysis.
Feb 10, 2017
5c121b9
Remove the top variable from the cfg_dominator analysis.
Feb 10, 2017
7cbf75e
initial support for miniz
Feb 14, 2017
9a95352
use amalgamated files from release tarball
Feb 23, 2017
f8226f2
type cleanup in miniz
Feb 23, 2017
122db27
update Makefiles / remove all references to libzip/zlib
Feb 14, 2017
1f79d21
regression test with multiple JARs/classpath
Feb 14, 2017
3d85f48
disable unaligned load/store for g++
Feb 23, 2017
6ae2c79
auto-fix cpplint errors with generated sed script
Feb 23, 2017
ac41f93
Use remove_instanceof in driver programs
smowton Dec 14, 2016
ddb4f42
Added a side effect expr that pushes/pops Java try-catch handlers + i…
cristina-david Feb 8, 2017
a805db9
Regression tests for exception handling
cristina-david Dec 15, 2016
1aafb61
Recreate the try-catch structure from the exception table
cristina-david Feb 8, 2017
b9283bb
Remove throw/try-catch and add the required instrumentation
cristina-david Dec 14, 2016
eb89cc5
Moved Java exceptions regression tests
cristina-david Feb 15, 2017
2de46fb
Escaping brackets in test descriptions
cristina-david Feb 17, 2017
b96e03a
Fixed test description for cbmc-java/virtual7
cristina-david Feb 17, 2017
3b31d23
Recompute live ranges for local variables and add corresponding DEAD …
cristina-david Feb 28, 2017
96764a2
Forced try-catch to start a new basic block
cristina-david Feb 28, 2017
fa1e3d2
Java checkcast: fix stack when check disabled
smowton Nov 30, 2016
a43b862
Explore matching nested bracketed stuff
rjmunro Feb 16, 2017
4e6c7b2
Fix ; after } errors
rjmunro Feb 20, 2017
89d259e
Fix missing space after , errors
rjmunro Feb 20, 2017
ce6b2b4
Replace tabs globally within the line
rjmunro Feb 20, 2017
0b11c43
Add space after comma globally within the line
rjmunro Mar 3, 2017
f81c73c
set EXIT to 10 to all failing string-solver test cases
lucasccordeiro Mar 3, 2017
122ec36
Add string-infix utility
smowton Oct 27, 2016
47f84b9
Add json->irep deserialization routine
smowton Feb 23, 2017
b3a06f0
Merge pull request #600 from lucasccordeiro/fixed-string-regression
Mar 8, 2017
921fdfd
Merge pull request #598 from smowton/sss_checkcast
Mar 8, 2017
098a52a
Merge pull request #548 from mgudemann/miniz_support
Mar 8, 2017
38f8f5c
libzip/zlib download no longer needed
Mar 8, 2017
1dcee0d
Fixed compilation issues on MinGW
pkesseli Mar 8, 2017
4e87608
remove `<regex>` from unapproved headers in cpplint
Mar 9, 2017
2245eb2
Merge pull request #617 from mgudemann/allow_regex_in_cpplint
Mar 9, 2017
b236ee4
allow regex to limit class files loaded from JAR
Mar 4, 2017
ed34a73
support class load configuration via JSON file
Mar 7, 2017
469897f
add jars from JSON config to classpath
Mar 7, 2017
3d009a9
add regression test
Mar 7, 2017
f6d9f3b
Support for Linux based on musl-libc.
Mar 10, 2017
50c28c3
Add test for Alpine linux (musl-libc).
Mar 10, 2017
b473638
take comments into account
Mar 10, 2017
53fad70
change from vector indices to map
Mar 10, 2017
13c8f83
Restructuring such that the exceptions instrumentation is added in on…
cristina-david Mar 2, 2017
90921d2
Add jump to the end of the current function if a function call throws…
cristina-david Mar 2, 2017
45239a8
Modified the expected goto-program for cbmc-java/virtual7 as exceptio…
cristina-david Mar 2, 2017
4a44668
+ regression test for Java exception handling
cristina-david Mar 2, 2017
272bce3
Merge pull request #506 from cristina-david/exception-handling
Mar 11, 2017
36c2e2d
Merge pull request #604 from mgudemann/limit_class_loading
Mar 13, 2017
aeb99e8
Merge pull request #558 from rjmunro/feature/cpplint-sed-format
Mar 13, 2017
eb93231
Merge pull request #526 from martin-cs/fix-cfg-dominator-top
Mar 13, 2017
0139558
Merge pull request #570 from zemanlx/feature/compile-on-musl
Mar 13, 2017
211cb90
Invoked full_slicer after generic property intrumentation
lucasccordeiro Mar 13, 2017
30fe7c8
Added IDE files to .gitignore
NathanJPhillips Mar 14, 2017
5f272f7
Remove unnecessary casts from json.h
NathanJPhillips Mar 14, 2017
1855bcd
Comment on potential gotcha
NathanJPhillips Mar 14, 2017
1a88570
adds java.lang.Class to load queue
Mar 15, 2017
92d589a
Tag the exceptional return of the entry function as output
cristina-david Dec 21, 2016
0e1b194
Merge pull request #523 from smowton/factor_fresh_symbol
Mar 15, 2017
c1d8ff3
Merge pull request #638 from mgudemann/bugfix/load_java_lang_class
Mar 15, 2017
7d5a610
Merge pull request #599 from smowton/sss_infix
Mar 15, 2017
1cea18f
Merge pull request #627 from NathanJPhillips/cleanup/minor
Mar 15, 2017
415c324
Merge pull request #578 from cristina-david/tag-exceptional-return-as…
Mar 15, 2017
409f97e
Merge pull request #630 from lucasccordeiro/fix-full-slice-01
Mar 15, 2017
835277b
Fixed crash on non-ascii diff
Mar 15, 2017
fee04d6
Merge pull request #644 from thk123/bugfix/lint-non-ascii-crash
Mar 15, 2017
60d0782
Missing forward declaration
Mar 16, 2017
4da4b1f
Merge pull request #650 from thk123/bugfix/missing-include
Mar 18, 2017
88b87d3
Merge pull request #527 from martin-cs/pointer-analysis-tidy
Mar 18, 2017
1215d7f
Merge pull request #487 from danpoe/dependence-graph-dominator-use-fix
Mar 18, 2017
e0905ae
map with sharing
danpoe Dec 9, 2016
0909115
Merge pull request #653 from danpoe/sharing-map
Mar 18, 2017
1ca2b70
make tests pass on 32-bit systems
Mar 18, 2017
6bbe831
make tests pass on 32-bit systems
Mar 18, 2017
f082419
compilation instructions
Mar 18, 2017
30c63df
Merge branch 'master' of github.com.:diffblue/cbmc
Mar 18, 2017
4b1b627
we don't use libzip any more
Mar 19, 2017
f968968
convenient zero factories for floating point and fixed point types
Mar 19, 2017
d03aa42
re-added missing inline keywords
Mar 19, 2017
f04d40a
removed dependency on linking module
Mar 19, 2017
7a8961e
avoid a warning
Mar 19, 2017
775bbef
new option --no-caching for use with inlining to disable caching of i…
danpoe Feb 20, 2017
0f0ab68
progress output
danpoe Feb 20, 2017
7b8a4e6
Merge pull request #654 from danpoe/inlining-no-caching
Mar 19, 2017
a7663cb
increased version number to 5.7
Mar 19, 2017
8723d57
Merge master into SSS
NathanJPhillips Mar 20, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Local files generated by IDEs
.vs/*
.vscode/*
~AutoRecover.*
*.sln
*.vcxproj*
scripts/__pycache__/*
src/goto-analyzer/taint_driver_scripts/.idea/*
/*.config
/*.creator
/*.creator.user
/*.files
/*.includes

# compilation files
*.lo
Expand Down
51 changes: 39 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
language: cpp

sudo: false

matrix:
include:

# Alpine Linux with musl-libc using g++
- os: linux
sudo: required
compiler: gcc
services:
- docker
before_install:
- docker pull diffblue/cbmc-builder:alpine
env:
- PRE_COMMAND="docker run -v ${TRAVIS_BUILD_DIR}:/cbmc diffblue/cbmc-builder:alpine"
- COMPILER=g++

# OS X using g++
- os: osx
sudo: false
compiler: gcc
env: COMPILER=g++

# OS X using clang++
- os: osx
sudo: false
compiler: clang
env: COMPILER=clang++

# Ubuntu Linux with glibc using g++-5
- os: linux
sudo: false
compiler: gcc
addons:
apt:
Expand All @@ -20,7 +45,10 @@ matrix:
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
env: COMPILER=g++-5

# Ubuntu Linux with glibc using clang++-3.7
- os: linux
sudo: false
compiler: clang
addons:
apt:
Expand All @@ -38,18 +66,17 @@ matrix:
- mkdir bin ; ln -s /usr/bin/clang-3.7 bin/gcc
# env: COMPILER=clang++-3.7 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined,integer -fno-omit-frame-pointer"
env: COMPILER=clang++-3.7
- os: osx
compiler: gcc
env: COMPILER=g++
- os: osx
compiler: clang
env: COMPILER=clang++

- env: NAME="CPP-LINT"
script: scripts/travis_lint.sh || true

script:
- if [ -L bin/gcc ] ; then export PATH=$PWD/bin:$PATH ; fi ;
make -C src minisat2-download &&
make -C src CXX=$COMPILER CXXFLAGS="-Wall -O2 -g -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare" -j2 &&
env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test &&
make -C src CXX=$COMPILER CXXFLAGS=$FLAGS -j2 cegis.dir clobber.dir memory-models.dir musketeer.dir
COMMAND="make -C src minisat2-download" &&
eval ${PRE_COMMAND} ${COMMAND} &&
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O2 -g -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare\" -j2" &&
eval ${PRE_COMMAND} ${COMMAND} &&
COMMAND="env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test" &&
eval ${PRE_COMMAND} ${COMMAND} &&
COMMAND="make -C src CXX=$COMPILER CXXFLAGS=$FLAGS -j2 cegis.dir clobber.dir memory-models.dir musketeer.dir" &&
eval ${PRE_COMMAND} ${COMMAND}
22 changes: 9 additions & 13 deletions COMPILING
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ environments:

- Solaris 11

- FreeBSD 10 or 11
- FreeBSD 11

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

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

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

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

On Red Hat/Fedora or derivates, do

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

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

1) As a user, get the CBMC source via

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

cd cbmc-git/src
make minisat2-download
make libzip-download zlib-download
make libzip-build
make


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

pkg install system/header developer/lexer/flex developer/parser/bison developer/versioning/git
pkg install --accept developer/gcc-49
pkg install --accept developer/gcc-5

2) As a user, get the CBMC source via

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


COMPILATION ON FREEBSD 10/11
----------------------------
COMPILATION ON FREEBSD 11
-------------------------

1) As root, get the necessary tools:

Expand Down Expand Up @@ -126,8 +124,6 @@ Follow these instructions:

cd cbmc-git/src
make minisat2-download
make libzip-download zlib-download
make libzip-build
make


Expand Down
Binary file modified regression/cbmc-java/NullPointer3/NullPointer3.class
Binary file not shown.
1 change: 0 additions & 1 deletion regression/cbmc-java/NullPointer3/NullPointer3.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ public static void main(String[] args)
{
throw null; // NULL pointer dereference
}

}
4 changes: 2 additions & 2 deletions regression/cbmc-java/NullPointer3/test.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
CORE
NullPointer3.class
--pointer-check --stop-on-fail
--pointer-check
^EXIT=10$
^SIGNAL=0$
^ file NullPointer3.java line 5 function java::NullPointer3.main:\(\[Ljava/lang/String;\)V bytecode_index 1$
^.*Throw null: FAILURE$
^VERIFICATION FAILED$
--
^warning: ignoring
2 changes: 1 addition & 1 deletion regression/cbmc-java/VarLengthArrayTrace1/test.desc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VarLengthArrayTrace1.class
--trace
^EXIT=10$
^SIGNAL=0$
dynamic_3_array\[1l\]=10
dynamic_3_array\[1.*\]=10
--
^warning: ignoring
assignment removed
Expand Down
Binary file added regression/cbmc-java/classtest1/classtest1.class
Binary file not shown.
11 changes: 11 additions & 0 deletions regression/cbmc-java/classtest1/classtest1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
public class classtest1
{
static void main(String[] args)
{
g(classtest1.class);
}
static void g(Object c)
{
assert true;
}
}
8 changes: 8 additions & 0 deletions regression/cbmc-java/classtest1/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CORE
classtest1.class

^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
--
^warning: ignoring
Binary file added regression/cbmc-java/exceptions1/A.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions1/B.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions1/C.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions1/D.class
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions regression/cbmc-java/exceptions1/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CORE
test.class

^EXIT=10$
^SIGNAL=0$
^.*assertion at file test.java line 26 function.*: FAILURE$
\*\* 1 of 9 failed \(2 iterations\)$
^VERIFICATION FAILED$
--
^warning: ignoring
30 changes: 30 additions & 0 deletions regression/cbmc-java/exceptions1/test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
class A extends Throwable {}
class B extends A {}
class C extends B {}
class D extends C {}

public class test {
public static void main (String arg[]) {
try {
D d = new D();
C c = new C();
B b = new B();
A a = new A();
A e = a;
throw e;
}
catch(D exc) {
assert false;
}
catch(C exc) {
assert false;
}
catch(B exc) {
assert false;
}
catch(A exc) {
assert false;
}
}
}

Binary file added regression/cbmc-java/exceptions10/A.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions10/B.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions10/C.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions10/test.class
Binary file not shown.
9 changes: 9 additions & 0 deletions regression/cbmc-java/exceptions10/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
test.class

^EXIT=10$
^SIGNAL=0$
^.*assertion at file test.java line 12 function.*: FAILURE$
^VERIFICATION FAILED$
--
^warning: ignoring
25 changes: 25 additions & 0 deletions regression/cbmc-java/exceptions10/test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class A extends RuntimeException {}
class B extends A {}
class C extends B {}

public class test {
static void foo() {
try {
A b = new A();
throw b;
}
catch(A exc) {
assert false;
}
}

public static void main (String args[]) {
try {
A a = new A();
foo();
}
catch(B exc) {
assert false;
}
}
}
Binary file added regression/cbmc-java/exceptions11/A.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions11/B.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions11/test.class
Binary file not shown.
9 changes: 9 additions & 0 deletions regression/cbmc-java/exceptions11/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
test.class

^EXIT=10$
^SIGNAL=0$
^.*assertion at file test.java line 36 function.*: FAILURE$
^VERIFICATION FAILED$
--
^warning: ignoring
39 changes: 39 additions & 0 deletions regression/cbmc-java/exceptions11/test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
class A extends RuntimeException {
int i=1;
};

class B extends A {
};

public class test {
static int foo(int k) {
try {
if(k==0)
{
A a = new A();
throw a;
}
else
{
A b = new A();
throw b;
}

}
catch(B exc) {
assert exc.i==1;
}
return 1;
}


public static void main (String args[]) {
try {
A a = new A();
foo(6);
}
catch(A exc) {
assert exc.i==2;
}
}
}
Binary file added regression/cbmc-java/exceptions12/A.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions12/B.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions12/C.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions12/F.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions12/test.class
Binary file not shown.
9 changes: 9 additions & 0 deletions regression/cbmc-java/exceptions12/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
test.class

^EXIT=10$
^SIGNAL=0$
^.*assertion at file test.java line 12 function.*: FAILURE$
^VERIFICATION FAILED$
--
^warning: ignoring
27 changes: 27 additions & 0 deletions regression/cbmc-java/exceptions12/test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
class A extends RuntimeException {}
class B extends A {}
class C extends B {}

class F {
void foo() {
try {
B b = new B();
throw b;
}
catch(B exc) {
assert false;
}
}
}

public class test {
public static void main (String args[]) {
try {
F f = new F();
f.foo();
}
catch(B exc) {
assert false;
}
}
}
Binary file added regression/cbmc-java/exceptions13/A.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions13/B.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions13/C.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions13/F.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions13/test.class
Binary file not shown.
9 changes: 9 additions & 0 deletions regression/cbmc-java/exceptions13/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
test.class

^EXIT=10$
^SIGNAL=0$
^.*assertion at file test.java line 25 function.*: FAILURE$
^VERIFICATION FAILED$
--
^warning: ignoring
Loading