Skip to content

Commit 356aed4

Browse files
Squashed 'cbmc/' changes from 739c7f5..4820601
4820601 Merge remote-tracking branch 'diffblue/develop' into merge-dev-to-ss 278f309 Merge pull request diffblue#1526 from reuk/reuk/fixup-unified-diff 69ba9e7 Merge pull request diffblue#1546 from smowton/smowton/feature/expose_tarjan 05dc65c Use lower-case characters to start error messages 8d0b23b Change asserts to invariants a7afc6c Return from get_diff by value 6833af6 Fix formatting 4555d9f Remove unused parameter e32c6c5 Make instructions_equal static f815cc0 Move instructions_equal definition 11c9acc Add getter for data member 8c35211 Make data member private f54db47 Rename differences map data member b67d6e8 Merge pull request diffblue#1543 from chrisr-diffblue/cleanup/add-java-array-element-type-helper c9241cd Make generic Tarjan's algorithm publically available ebabdb9 Merge pull request diffblue#1542 from smowton/smowton/cleanup/sharing-node-assertion a523d6f Add a helper function for accessing the element type of a Java array type d8e8a68 Use INVARIANT rather than assert for sharing-node assertions 64d5dd2 Merge pull request diffblue#1538 from smowton/smowton/cleanup/remove-returns-asserts-to-invariants fca7c04 Merge pull request diffblue#1537 from smowton/smowton/cleanup/sharing-node-test-to-catch e35372a Merge pull request diffblue#1539 from romainbrenguier/bugfix/char-array-in-java-strings#TG-58#newpr 4d011b5 Merge pull request diffblue#1541 from owen-jones-diffblue/replace-unsigned-with-number-type b2a4e39 Merge pull request diffblue#1540 from owen-jones-diffblue/rename-detach 2f6ceed Replace unsigned with appropriate type 938ab2b Replace 'detatch' with 'detach' c219663 Convert sharing-node test to run under Catch dec5ddf Remove-returns: asserts -> invariants 3b1f485 Merge pull request diffblue#1535 from andreast271/ignore-eclipse-vs-dirs 6cea5aa Ignore files and directories created by Eclipse and Visual Studio aa94fe8 Style: add nolint marker on lines formated by clang ee4a887 Merge pull request diffblue#1458 from LAJW/perl-platform 4da5a94 Add templating functionality to the perl script 21b2641 Move make_function_application to java_utils 5196e40 Merge pull request diffblue#884 from nmanthey/ipasir-no-ci 3ee3b25 Refactor: remove m_ prefix from member fields 539ff9f Refactoring: simplify and remove unused expression 5a0d6b4 Rename first_index in array_expr d03b8cc Remove regression test that is not checking anything 90c8495 Improve tests for StringBuilder.append([C) 232617c Add code for String constructor from array a2d7811 Use dynamic object instead of tmp_object in init daef30f Splitting is_string and init_string parts of init ad65847 Style: rename i in chr_int to avoid clash e59349f Remove redundant check in from_int_with_radix 038b476 Allow index for argument of associate array to pointer 73d51fc Remove insert_long which duplicates insert_int bb22700 Cleanup unused fields of constraint generator 2355e8e Fix set of created strings in generator and use it 26e895d Distinguish strings and char arrays in get 4b8a421 Make get_array return array of unknown expr ca8213f Simplify not_contains constraints before negation 92897f7 Style fixes in string_constraint_generator.h 145364c String refinement: Improve debug information 3e5b3f1 Minor code improvements in string refinement 3d5465e Minor code improvements in generator_insert 86e1444 Refactoring: use begin()+3 instead of 3 times next fef1c5f Correction in debug model 28590fe Correction in constraints for concat 6861b9d Documentation fixes in stirng constraint generator c410159 Regression: StringBuilder append with int argument e6700ff Minor improvements in bytecode typecheck 61f0e1b Making check_axioms for string_constraints and not_contains_constraints more uniform f2122c6 Correct signature of convert_exprt_to_string_exprt_unit_test 9edbb90 [string-refinement] Change get_array to return optional 86e4782 [string-refinement] Allow index set saturation if not_contains_constraints are present c9c612d [string-refinement] Do not update index set of constant arrays b88fe35 [string-refinement] Check for char type 1a22916 [string-refinement] Display debug info for index-set 982a5fc Style and documentation fixes in preprocessing a83daa7 Minor indentation, naming and const-fixes 15fd1b4 Fix typos in strings and comments of string solver 26ae9a9 Unit test improve convert exprt to string exprt b76b116 Minor improvements in string preprocessing 05a6b09 [constraint-generator] Removing declarations of unimplemented functions 302f92e Make string primitives return return_code_type b80d063 Doxygen corrections 369dd62 Unit test: adapte instantiate_nc for new signature dcae158 [string-refinement] Removing unused functions b6b2669 Style changes in string_constraint_generator_testing edf7057 Complete string solver rework 9ea2eda Unit tests for union_find_replacet 4adf5d0 New class for union find replace 1d112d5 Java object factory for nondet strings 0ae71b0 [string-preprocessing] New functions for calling string primitives in initialization e89f5e4 [string-preprocess] Refactor java_types_matches_tag 2505982 Extra preconditions in string solver 6378400 Style improvements in the string solver 36d6e6d [util/irep_ids] Additional identifiers fa45b34 Regression test mprovement for if expressions 76cd14d Unit test for gen_nondet_string_init c71c64b Regression: include model for string to char array c3d527c compiling: add IPASIR notes for Linux 900a0fc tests: do not match iterations line 751208d tests: drop number of iterations 12a6917 build: add ipasir solver support 14419d2 solvers: add ipasir driver 8aa89be build: introduce LIBSOLVER environment variable df45bdb Merge pull request diffblue#1524 from reuk/reuk/fix-linter 4b39446 Merge pull request diffblue#1518 from diffblue/taint-for-C 25e18c0 Merge pull request diffblue#1529 from smowton/smowton/fix/float128 3cf67f7 Merge pull request diffblue#1531 from reuk/reuk/expr-cast-fixup 2169a39 Add _Float128 spelling for 128-bit float type a3cf849 Merge pull request diffblue#1530 from martin-cs/feature/document-return-codes 188f263 Enable casting from derived types to other derived types 3dd7f6c first regression tests 29bc3b8 custom_bitvector_domain: allow objects that are members ab7270e check taint on sinks _before_ the call 6daa8bd Merge pull request diffblue#1528 from tautschnig/shl-overflow 2df2abb Change a few erronious return codes so that they are more internally consistent. cf96cef Minor changes to erronious exit behaviour. c8dfd48 Replace constants exit codes with meaningfully named macros. 961d33a Replace literal constants in returns / exits with their symbolic names. e74b442 Named, possibly even descriptive macros for the exit codes that are used. 1e3712c Shifts of non-integers and left shifts of negative integers are undefined 6bb3872 Check for overflow on left shift of signed ints f9af374 Merge pull request diffblue#1512 from thk123/bugfix/TG-1058/crash-inner-class-generic-class bd2e9c2 Merge pull request diffblue#1522 from reuk/reuk/clang-format-plain-diff f892f4a Added tests for bracket matcher to include different types of brackets 3beab8b Fixed error in find_closing_delimiter 0b3058f Tightened up exception for unknown handling 9f87a80 Assertion on unmatched ; for parsing reference types 5922826 Adding doubly nested generic tests 4a62b07 Simplifying method names for unit test ee39620 Extended tests to verify the generic information is being parsed correctly. 465a473 Parse multiple nested generic type informations b8d43ab Pulled out method for parsing a list of multiple types 2a5c280 Correctly parse multiple input parameters for functions 35d974f Add method for finding the matching ; corresponding to a reference L e1621a3 Hide methods relating to getting multiple type variables for specific param e952708 Adding tests for parsing methods of generic classes with inner classes 958c006 Adding utilities for code_type structures 72a041b Don't crash when found an invalid reference type ed545cb Refactored out the code for erasing generic types effc1b2 Parse the whole class when generics are present d23a0cc Added function for getting the full class name of a type 34c185e Unit test reproducing the bug described in TG-1058 5b92002 Adding utilities for checking types in unit tests a00edd3 Disable dowhile brace check by default d38b5d8 Disable colour in travis diff display git-subtree-dir: cbmc git-subtree-split: 4820601
1 parent 320f0bc commit 356aed4

File tree

167 files changed

+6326
-3410
lines changed

Some content is hidden

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

167 files changed

+6326
-3410
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ src/goto-analyzer/taint_driver_scripts/.idea/*
1111
/*.creator.user
1212
/*.files
1313
/*.includes
14+
# Eclipse
15+
src/.cproject
16+
src/.project
17+
src/.settings/*
18+
# Visual Studio
19+
Debug/*
20+
Release/*
1421

1522
# compilation files
1623
*.lo

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ jobs:
2020
# Now we can do the formatting pass
2121
clang-format --version
2222
git-clang-format-3.8 "${TRAVIS_BRANCH}"
23-
git diff --color > formatted.diff
23+
git diff > formatted.diff
2424
if [[ -s formatted.diff ]] ; then
25-
echo 'Formatting error! Apply the following diff and resubmit:'
25+
echo 'Formatting error! The following diff shows the required changes'
26+
echo 'Use the raw log to get a version of the diff that preserves spacing'
2627
cat formatted.diff
2728
exit 1
2829
fi

COMPILING.md

Lines changed: 13 additions & 0 deletions

regression/ansi-c/gcc_types_compatible_p1/main.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ STATIC_ASSERT(__builtin_types_compatible_p(typeof (hot) *, int *));
6767
STATIC_ASSERT(__builtin_types_compatible_p(typeof (hot), typeof (janette)));
6868
STATIC_ASSERT(__builtin_types_compatible_p(__int128, signed __int128));
6969

70+
#ifndef __clang__
71+
// clang doesn't have these
72+
#if defined(__x86_64__) || defined(__i386__)
73+
STATIC_ASSERT(__builtin_types_compatible_p(__float128, _Float128));
74+
#endif
75+
#endif
76+
7077
/* Incompatible types */
7178

7279
STATIC_ASSERT(!__builtin_types_compatible_p(char, _Bool));

regression/cbmc-concurrency/pthread_join1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ main.c
55
^SIGNAL=0$
66
^\[main\.assertion\.1\] assertion i==1: FAILURE$
77
^\[main\.assertion\.2\] assertion i==2: SUCCESS$
8-
^\*\* 1 of 2 failed \(2 iterations\)$
8+
^\*\* 1 of 2 failed
99
--
1010
^warning: ignoring

regression/cbmc-cover/mcdc1/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ main.c
1010
^\[main.coverage.5\] file main.c line 14 function main MC/DC independence condition `C && D && E && !A && B.*: SATISFIED$
1111
^\[main.coverage.6\] file main.c line 14 function main MC/DC independence condition `C && D && E && !A && !B.*: SATISFIED$
1212
^\*\* .* of .* covered \(100.0%\)$
13-
^\*\* Used 10 iterations$
1413
--
1514
^warning: ignoring

regression/cbmc-cover/mcdc11/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ main.c
1010
^\[main.coverage.11\] file main.c line 12 function main MC/DC independence condition `!\(C != FALSE\) && D != FALSE.*: SATISFIED$
1111
^\[main.coverage.12\] file main.c line 12 function main MC/DC independence condition `!\(C != FALSE\) && !\(D != FALSE\).*: SATISFIED$
1212
^\*\* .* of .* covered \(100.0%\)$
13-
^\*\* Used 6 iterations$
1413
--
1514
^warning: ignoring

regression/cbmc-cover/mcdc12/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ main.c
1313
^\[main.coverage.20\] file main.c line 25 function main MC/DC independence condition `!\(E != FALSE\) && F != FALSE.*: SATISFIED$
1414
^\[main.coverage.21\] file main.c line 25 function main MC/DC independence condition `!\(E != FALSE\) && !\(F != FALSE\).*: SATISFIED$
1515
^\*\* .* of .* covered \(100.0%\)$
16-
^\*\* Used 10 iterations$
1716
--
1817
^warning: ignoring

regression/cbmc-cover/mcdc14/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ main.c
66
^\[main.coverage.1\] file main.c line 7 function main decision/condition `altitude > 2500.* SATISFIED$
77
^\[main.coverage.2\] file main.c line 7 function main decision/condition `altitude > 2500.* SATISFIED$
88
^\*\* .* of .* covered \(100.0%\)$
9-
^\*\* Used 2 iterations$
109
--
1110
^warning: ignoring

regression/cbmc-cover/mcdc3/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ main.c
77
^\[main.coverage.2\] file main.c line 8 function main MC/DC independence condition `y < \(unsigned int\)5 && !\(x > \(unsigned int\)3\).*: SATISFIED$
88
^\[main.coverage.3\] file main.c line 8 function main MC/DC independence condition `y < \(unsigned int\)5 && x > \(unsigned int\)3.*: SATISFIED$
99
^\*\* .* of .* covered \(100.0%\)$
10-
^\*\* Used 4 iterations$
1110
--
1211
^warning: ignoring

regression/cbmc-cover/mcdc4/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ main.c
99
^\[main.coverage.4\] file main.c line 11 function main MC/DC independence condition `!C && D && A && !B.*: SATISFIED$
1010
^\[main.coverage.5\] file main.c line 11 function main MC/DC independence condition `!A && B && C && !D.*: SATISFIED$
1111
^\*\* .* of .* covered \(100.0%\)$
12-
^\*\* Used 9 iterations$
1312
--
1413
^warning: ignoring

regression/cbmc-cover/mcdc6/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ main.c
66
^\[main.coverage.1\] file main.c line 7 function main decision/condition `x < \(unsigned int\)3.* false: SATISFIED$
77
^\[main.coverage.2\] file main.c line 7 function main decision/condition `x < \(unsigned int\)3.* true: SATISFIED$
88
^\*\* .* of .* covered \(100.0%\)$
9-
^\*\* Used 2 iterations$
109
--
1110
^warning: ignoring

regression/cbmc-cover/mcdc7/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ main.c
88
^\[main.coverage.3\] file main.c line 8 function main decision/condition `x \* 123 < 0.* false: SATISFIED$
99
^\[main.coverage.4\] file main.c line 8 function main decision/condition `x \* 123 < 0.* true: SATISFIED$
1010
^\*\* .* of .* covered \(100.0%\)$
11-
^\*\* Used 2 iterations$
1211
--
1312
^warning: ignoring

regression/cbmc-cover/mcdc8/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ main.c
88
^\[main.coverage.3\] file main.c line 9 function main MC/DC independence condition `c != FALSE && !\(a != FALSE\) && !\(b != FALSE\).* SATISFIED$
99
^\[main.coverage.4\] file main.c line 9 function main MC/DC independence condition `!\(c != FALSE\) && a != FALSE && !\(b != FALSE\).* SATISFIED$
1010
^\*\* .* of .* covered \(100.0%\)$
11-
^\*\* Used 6 iterations$
1211
--
1312
^warning: ignoring

regression/cbmc-cover/mcdc9/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ main.c
99
^\[main.coverage.12\] file main.c line 16 function main MC/DC independence condition `!\(A != FALSE\) && B != FALSE && C != FALSE && !\(D != FALSE\).* SATISFIED$
1010
^\[main.coverage.13\] file main.c line 16 function main MC/DC independence condition `!\(A != FALSE\) && !\(B != FALSE\) && C != FALSE && !\(D != FALSE\).* SATISFIED$
1111
^\*\* .* of .* covered \(100.0%\)$
12-
^\*\* Used 8 iterations$
1312
--
1413
^warning: ignoring

regression/cbmc-java/exceptions1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test.class
44
^EXIT=10$
55
^SIGNAL=0$
66
^.*assertion at file test.java line 26 function.*: FAILURE$
7-
\*\* 1 of [0-9]* failed \(2 iterations\)$
7+
\*\* 1 of [0-9]* failed
88
^VERIFICATION FAILED$
99
--
1010
^warning: ignoring

regression/cbmc-java/exceptions2/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test.class
44
^EXIT=10$
55
^SIGNAL=0$
66
^.*assertion at file test.java line 15 function.*: FAILURE$
7-
^\*\* 1 of [0-9]* failed \(2 iterations\)$
7+
^\*\* 1 of [0-9]* failed
88
^VERIFICATION FAILED$
99
--
1010
^warning: ignoring

regression/cbmc-with-incr/Multi_Dimensional_Array6/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ main.c
55
^SIGNAL=0$
66
^\[main\.assertion\.1\] assertion matriz\[\(signed long int\)j\]\[\(signed long int\)k\] <= maior: OK$
77
^\[main\.assertion\.2\] assertion matriz\[\(signed long int\)0\]\[\(signed long int\)0\] < maior: FAILED$
8-
^\*\* 1 of 2 failed \(2 iterations\)$
8+
^\*\* 1 of 2 failed
99
--
1010
^warning: ignoring

regression/cbmc-with-incr/Pointer_byte_extract2/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=10$
55
^SIGNAL=0$
66
^\[main\.assertion\.2\] .*: FAILED$
7-
^\*\* 1 of 2 failed \(2 iterations\)$
7+
^\*\* 1 of 2 failed
88
--
99
^warning: ignoring

regression/cbmc-with-incr/Pointer_byte_extract5/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=10$
55
^SIGNAL=0$
66
^\[main\.array_bounds\.5\] array.List upper bound in .*: FAILED$
7-
^\*\* 1 of 9 failed \(2 iterations\)$
7+
^\*\* 1 of 9 failed
88
--
99
^warning: ignoring

regression/cbmc-with-incr/Pointer_byte_extract8/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=0$
55
^SIGNAL=0$
66
^\[main\.array_bounds\.5\] array.List upper bound: FAILED$
7-
^\*\* 1 of 9 failed \(2 iterations\)$
7+
^\*\* 1 of 9 failed
88
--
99
^warning: ignoring

regression/cbmc-with-incr/pipe1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=10$
55
^SIGNAL=0$
66
^\[main\.assertion\.4\] assertion data\[1\]==31: FAILED$
7-
^\*\* 1 of 5 failed \(2 iterations\)$
7+
^\*\* 1 of 5 failed
88
--
99
^warning: ignoring

regression/cbmc/Malloc23/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ pointer outside dynamic object bounds in \*p: FAILURE
77
pointer outside dynamic object bounds in \*p: FAILURE
88
pointer outside dynamic object bounds in p2\[.*1\]: FAILURE
99
pointer outside dynamic object bounds in p2\[.*0\]: FAILURE
10-
\*\* 4 of 36 failed \(3 iterations\)
10+
\*\* 4 of 36 failed
1111
--
1212
^warning: ignoring

regression/cbmc/Multi_Dimensional_Array6/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ main.c
55
^SIGNAL=0$
66
^\[main\.assertion\.1\] : SUCCESS$
77
^\[main\.assertion\.2\] : FAILURE$
8-
^\*\* 1 of 2 failed \(2 iterations\)$
8+
^\*\* 1 of 2 failed
99
--
1010
^warning: ignoring
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
int main()
2+
{
3+
unsigned char x;
4+
unsigned r=x << ((sizeof(unsigned)-1)*8);
5+
r=x << ((sizeof(unsigned)-1)*8-1);
6+
r=(unsigned)x << ((sizeof(unsigned)-1)*8);
7+
8+
int s=-1 << ((sizeof(int)-1)*8);
9+
s=-256 << ((sizeof(int)-1)*8);
10+
return 0;
11+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
main.c
3+
--signed-overflow-check
4+
^SIGNAL=0$
5+
^\[.*\] arithmetic overflow on signed shl in .*: FAILURE$
6+
^\*\* 2 of 4 failed
7+
^VERIFICATION FAILED$
8+
--
9+
^warning: ignoring

regression/cbmc/Pointer_byte_extract2/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=10$
55
^SIGNAL=0$
66
^\[main\.assertion\.2\] .*: FAILURE$
7-
^\*\* 1 of 2 failed \(2 iterations\)$
7+
^\*\* 1 of 2 failed
88
--
99
^warning: ignoring

regression/cbmc/Pointer_byte_extract5/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=10$
55
^SIGNAL=0$
66
array\.List dynamic object upper bound in p->List\[2\]: FAILURE
7-
\*\* 1 of 11 failed \(2 iterations\)
7+
\*\* 1 of 11 failed
88
--
99
^warning: ignoring

regression/cbmc/Pointer_byte_extract8/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=0$
55
^SIGNAL=0$
66
^\[main\.array_bounds\.5\] array.List upper bound: FAILED$
7-
^\*\* 1 of 9 failed \(2 iterations\)$
7+
^\*\* 1 of 9 failed
88
--
99
^warning: ignoring

regression/cbmc/Quantifiers-assertion/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ main.c
88
^\[main.assertion.4\] NotExists-Forall: failed: FAILURE$
99
^\[main.assertion.5\] NotForall-Forall: successful: SUCCESS$
1010
^\[main.assertion.6\] NotForall-NotForall: successful: SUCCESS$
11-
^\*\* 2 of 6 failed \(2 iterations\)$
11+
^\*\* 2 of 6 failed
1212
^VERIFICATION FAILED$

regression/cbmc/Quantifiers-assignment/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ main.c
66
^\[main.assertion.2\] assertion y: FAILURE$
77
^\[main.assertion.3\] assertion z1: SUCCESS$
88
^\[main.assertion.4\] assertion z2: SUCCESS$
9-
^\*\* 1 of 4 failed \(2 iterations\)$
9+
^\*\* 1 of 4 failed
1010
^VERIFICATION FAILED$

regression/cbmc/Quantifiers-if/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ main.c
77
^\[main.assertion.3\] success 1: SUCCESS$
88
^\[main.assertion.4\] failure 3: FAILURE$
99
^\[main.assertion.5\] success 2: SUCCESS$
10-
^\*\* 3 of 5 failed \(2 iterations\)$
10+
^\*\* 3 of 5 failed
1111
^VERIFICATION FAILED$

regression/cbmc/Quantifiers-initialisation2/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ main.c
77
^\[main.assertion.3\] assertion a\[.*\] > a\[.*\]: FAILURE$
88
^\[main.assertion.4\] forall c\[\]: SUCCESS$
99
^\[main.assertion.5\] assertion c\[.*\] >= c\[.*\]: SUCCESS$
10-
^\*\* 1 of 5 failed \(2 iterations\)$
10+
^\*\* 1 of 5 failed
1111
^VERIFICATION FAILED$

regression/cbmc/Quantifiers-not/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ main.c
77
^\[main.assertion.3\] failure 1: FAILURE$
88
^\[main.assertion.4\] success 3: SUCCESS$
99
^\[main.assertion.5\] failure 2: FAILURE$
10-
^\*\* 2 of 5 failed \(2 iterations\)$
10+
^\*\* 2 of 5 failed
1111
^VERIFICATION FAILED$

regression/cbmc/Quantifiers-type/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ main.c
44
^\*\* Results:$
55
^\[main.assertion.1\] assertion tmp_if_expr\$1: FAILURE$
66
^\[main.assertion.2\] assertion tmp_if_expr\$2: SUCCESS$
7-
^\*\* 1 of 2 failed \(2 iterations\)$
7+
^\*\* 1 of 2 failed
88
^VERIFICATION FAILED$
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
int main()
2+
{
3+
unsigned char x;
4+
unsigned r=x << ((sizeof(unsigned)-1)*8);
5+
r=x << ((sizeof(unsigned)-1)*8-1);
6+
r=(unsigned)x << ((sizeof(unsigned)-1)*8);
7+
8+
int s=-1 << ((sizeof(int)-1)*8);
9+
s=-256 << ((sizeof(int)-1)*8);
10+
return 0;
11+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
main.c
3+
--undefined-shift-check
4+
^SIGNAL=0$
5+
^\[.*\] shift operand is negative in .*: FAILURE$
6+
^\*\* 1 of 2 failed
7+
^VERIFICATION FAILED$
8+
--
9+
^warning: ignoring

regression/cbmc/fgets1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ main.c
55
^SIGNAL=0$
66
^VERIFICATION FAILED$
77
\[main.assertion.3\] assertion p\[1\]=='b': FAILURE
8-
\*\* 1 of \d+ failed \(2 iterations\)
8+
\*\* 1 of \d+ failed
99
--
1010
^warning: ignoring

regression/cbmc/memory_allocation1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ main.c
77
\[main.assertion.1\] assertion \*p==42: SUCCESS
88
\[main.pointer_dereference.14\] dereference failure: pointer invalid in p\[.*1\]: FAILURE
99
\[main.assertion.2\] assertion \*\(p\+1\)==42: SUCCESS
10-
\*\* 12 of 26 failed \(2 iterations\)
10+
\*\* 12 of 26 failed
1111
--
1212
^warning: ignoring

regression/cbmc/memset1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ main.c
55
^SIGNAL=0$
66
^VERIFICATION FAILED$
77
\[main.assertion.7\] assertion A\[1\]==0x01010111: FAILURE
8-
\*\* 1 of 12 failed \(2 iterations\)
8+
\*\* 1 of 12 failed
99
--
1010
^warning: ignoring

regression/cbmc/pipe1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=10$
55
^SIGNAL=0$
66
^\[main\.assertion\.4\] assertion data\[1\]==31: FAILURE$
7-
^\*\* 1 of 5 failed \(2 iterations\)$
7+
^\*\* 1 of 5 failed
88
--
99
^warning: ignoring

regression/cbmc/pointer-function-parameters-2/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ CORE
22
main.c
33
--function fun --cover branch
44
^\*\* 7 of 7 covered \(100.0%\)$
5-
^\*\* Used 4 iterations$
65
^Test suite:$
76
^a=\(\(signed int \*\*\)NULL\), tmp\$\d+=[^,]*, tmp\$\d+=[^,]*$
87
^a=&tmp\$\d+!0, tmp\$\d+=\(\(signed int \*\)NULL\), tmp\$\d+=[^,]*$

regression/cbmc/pointer-function-parameters/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ CORE
22
main.c
33
--function fun --cover branch
44
^\*\* 5 of 5 covered \(100\.0%\)$
5-
^\*\* Used 3 iterations$
65
^Test suite:$
76
^a=\(\(signed int \*\)NULL\), tmp\$\d+=[^,]*$
87
^a=&tmp\$\d+!0, tmp\$\d+=4$
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <stdlib.h>
2+
3+
void my_f(void *) { }
4+
void my_h(void *) { }
5+
void *my_g(void) { return malloc(1); }
6+
7+
void my_function()
8+
{
9+
void *o;
10+
11+
my_f(o); // T1 source
12+
my_h(o); // T1,T2 sink
13+
14+
o=my_g(); // T2 source
15+
my_h(o); // T1,T2 sink
16+
}
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{ "id": "my_f", "kind": "source", "where": "parameter1", "taint": "T1", "function": "my_f" },
3+
{ "id": "my_g", "kind": "source", "where": "return_value", "taint": "T2", "function": "my_g" },
4+
{ "id": "my_h1", "kind": "sink", "where": "parameter1", "taint": "T1", "function": "my_h", "message": "There is a T1 flow" },
5+
{ "id": "my_h2", "kind": "sink", "where": "parameter1", "taint": "T2", "function": "my_h", "message": "There is a T2 flow" }
6+
]

0 commit comments

Comments
 (0)