Skip to content

Commit ee73846

Browse files
committed
Squashed 'cbmc/' changes from 31c47c2..20e7bca
20e7bca Merge pull request diffblue#2179 from cesaro/java-concurrency-support3 25e5820 Java concurrency regression tests bc539b5 Adds support for concurrency in java programs 46849e9 Adding concurrency related methods to CProver.java c817486 Merge pull request diffblue#2171 from thomasspriggs/json_tweaks f3670e3 Expose `begin` and `end` methods of underlying `std::vector` in `json_arrayt`. 402bc56 Clang format updates. 2907ba9 Allow constructon of `json_stringt` from `irep_idt`. ce674b5 Update constructor of `jsont` based on the copy and move idiom. 28117d2 Expose `emplace_back` method of underlying `std::vector` in `json_arrayt`. a589a56 Supply `value_type` typedef in `json_arrayt` for STL algorithm usage. 1d0cd01 Merge pull request diffblue#2175 from diffblue/extract-goto-functiont 76d202a use goto_function.h when only goto_functiont is used b9cd297 split out goto_functiont from goto_functions.h into separate file 784b6dd Merge pull request diffblue#2119 from svorenova/gs_tg1121_regression 1b6a939 Merge pull request diffblue#2169 from sonodtt/patch-1 faaacec Add dashboard webhooks to travis 7b0673e Merge pull request diffblue#2154 from diffblue/jar-file-cleanup d069719 Merge pull request diffblue#1915 from karkhaz/kk-abstract-paths-worklist aac16d5 Merge pull request diffblue#2159 from peterschrammel/clean-up-specc d413dd8 Merge pull request diffblue#2123 from smowton/smowton/java-object-factory-zero-initializer 995a548 Merge pull request diffblue#2164 from tautschnig/cleanup-mp-arith a4d1891 Merge pull request diffblue#2160 from diffblue/fix-java-constructor-pretty-name b9db37d Merge pull request diffblue#2163 from tautschnig/fix-test 6b064b3 pretty name of constructors now uses empty declarator b008bf3 add signature to method pretty names a9bb35c strip package name from base_name of Java class symbols 7711933 Merge pull request diffblue#2162 from tautschnig/fix-format 7d91638 Merge pull request diffblue#2148 from diffblue/remove-fixedbv-option 7e09d5f Fix duplicate output of id in format() 033f4c5 Remove unnecessary (and inconsistent) return statement 90d59d8 Remove unused global constant 29763da Fix misleading comments: the required variant of numeric_cast does not exist a2260bd remove the --fixedbv command-line option 78901ef fix in rounder in fixed-point arithmetic class 8414886 Remove SpecC support 88bbe32 Clean up references to php frontend 3f52c59 Clean up commented include 01685b6 Clean up references to SpecC frontend 916eb1f Unit tests for path exploration strategies 88db26f Merge pull request diffblue#2155 from tautschnig/mode-fixes 2fb3d2f Add missing mode 85aba52 Make new LIFO path exploration the default feef069 Doxygen uses C++ parser for .h files 17951c8 Add path strategy chooser class 685937a Path exploration pushes both successors onto queue 2a86fb4 Bugfix: always print path exploration resume point e823538 Symex paths saved onto abstract data structure bbd4253 signal errors while getting file from JAR using optional 48f1af3 Merge pull request diffblue#2145 from cesaro/concurrency-support-for-clinit 8db6b22 Merge pull request diffblue#2139 from romainbrenguier/bugfix/annotations-as-comments 94bbbba Added new cmd option to jbmc, 'java-threading' 48914be Modifies the instrumented clinit_wrapper function ce9f046 Merge pull request diffblue#2146 from diffblue/extra-float-types 46267b5 Merge pull request diffblue#2153 from diffblue/elaborate-format_expr da940a9 Test for assignement of annotated field 9d94bf7 Make annotations comments in irep_idt 52e9737 new gcc floating-point type identifiers, Fixes: diffblue#2151 c6cbf7c Merge pull request diffblue#2147 from diffblue/fix-tempdir-buffer-overflow 957881c format now prints type expressions and the values of named sub-ireps 9609a52 simplify use of get_temporary_directory 5907f68 fix potential non-zero termination of a string buffer 41d7a45 Merge pull request diffblue#2129 from romainbrenguier/bugfix/generic_type_index 53bc892 Add invariant in java_generic_symbol_type e3f240a Use get_name in generic_type_index 4a6ae9b Add java_types unit tests to Makefile 4c5144d Unit test for generic_type_index 8f0f780 Unit test for java_generic_symbol_type 41b3a6a Move java_generic_symbol_typet definitions to cpp 0afbe0f Unit test java_type_from_string and fix doc b7c9ea1 Test for abstract class with two generic arguments c141611 Fix generic_type_index 8127d4d Merge pull request diffblue#2141 from romainbrenguier/bugfix/goto-convert-mode 4948b70 Merge pull request diffblue#1712 from karkhaz/kk-flush-all e0bc5fd Merge pull request diffblue#2143 from diffblue/missing-algorithm-include fbed57e Add precondition ensuring mode is not empty 2ef91e7 Make mode an argument of goto-convert functions 2b4cd76 missing #include <algorithm> for std::find_if_not 7d11e85 Zero-initialize object factory structs 392c765 cleanup the includes in src/java_bytecode 1050637 fix a comment c57439e missing const for parameter 227e83d Adding regression tests for multi-dimensional arrays b8ffa5e Merge pull request diffblue#2135 from diffblue/solver-cleanout 0dc35fd Merge pull request diffblue#2136 from diffblue/unwind_module_cleanout f6a92cc remove bmc_constraints a2d9822 remove OpenSMT 218dc31 remove support for SMT1 e8aaf09 remove unused includes b0f7476 remove do_unwind_module hook 4d75d3d Merge branch 'develop' of github.com:diffblue/cbmc into develop 60c03b3 whitespace fix 3ea32fe Merge pull request diffblue#2134 from peterschrammel/invalid-symbol-mode b2a58c8 Assign mode to invalid objects e4230c6 Merge pull request diffblue#2130 from romainbrenguier/bugfix/if-expr-mode c6beb68 Merge pull request diffblue#2128 from tautschnig/include-cleanup 973b309 Merge pull request diffblue#2073 from tautschnig/reset-namespace a6a825a Remove unused includes b04122e Move definition of base_type_eqt to .cpp 104bc56 Use pointer_offset_bits instead of locally hacking up what it does anyway 99755fe Move asserts to invariants (and provide suitable includes) 3af3d72 Do not unnecessarily use C string functions 3c697da Add test where tmp_if_expr is introduced 746e337 Set mode of if_exprt introduced in preprocessing 73e0c0f Use C++ streams instead of C-style snprintf d351a5d Use a single global INITIALIZE_FUNCTION macro instead of __CPROVER_initialize 9c03ca3 Use iosfwd instead of ostream where possible 6b8583d Merge pull request diffblue#2100 from tautschnig/string-table-cleanup 75caefa Merge pull request diffblue#2116 from peterschrammel/java-new-pass 6c90b35 Merge pull request diffblue#2052 from romainbrenguier/bugfix/default-axioms2#TG-2138 53dfa0a Merge pull request diffblue#2120 from diffblue/optional_optnr 8f7d9f0 use optional<size_t> instead of -1 in cmdlinet a61d03f Remove java_bytecode deps from Makefiles ce9f1fc Use remove_java_new 10d0042 more files to ignore 95ea29a Merge pull request diffblue#2115 from peterschrammel/language-mode-utils ce11613 Factor out java new removal into separate pass baa15f5 Add Makefile dependency for smt2_solver bacfa27 Merge pull request diffblue#2114 from tautschnig/type-renaming 2bdaafc Add more doxygen to language.h and mode.h 74c2c3d Utility functions to get mode and language b934aaf symex_dynamic::dynamic_object_size* are constants ef83f93 array_size symbols: set mode and avoid redundant settings 8b20ebb Merge pull request diffblue#2112 from diffblue/address_of_byte_extract 66aa851 Merge pull request diffblue#2109 from LAJW/lajw/free-lambda-from-cpplint-oppression 7339638 Merge pull request diffblue#2111 from peterschrammel/bugfix/missing-java-modes 18cab61 Rephrase and justify curly brace alignment exceptions 6670703 Added an extension point for irep ids 38782bd Move enum idt to the single translation unit that actually requires it e657da8 Fix Doxygen syntax f79b453 Check that the string table does not include unused entries 61ca5df Remove unused entries from the string table b2e4ca0 Use existing irep_idts instead of strings 2b819e6 Remove unused symbolt::{to,from}_irep 0b82ee2 allow address_of of byte_extract expressions 7747442 Associate dynamic objects with respective language mode 6438ee7 Bugfix: use proper language registration in unit tests c274c15 Set mode in goto_convert auxiliary symbols 9a896f9 Replace asserts by invariants 78191ee Remove NOLINTs for lambdas. 692c4f3 Remove brace checking from cpplint d344dd9 Update coding standard b59a453 Move MAX_CONCRETE_STRING_SIZE definition to magic 05b924c Deprecate string-max-length option 132a26b Add tests showing the effect on string-max-length 0e8a863 Add test for generics array and strings b83182f Get rid of string_max_length field d726577 Make char_array_of_pointer return a reference 2154047 Get rid of default axioms for strings 1d4f26c Assign 0 to string length for null Java String ff25fe2 Weaken invariant for nil exprt as model of array 56e7b37 Make get_array return nil for long strings 5fde05a Use string-max-length as default max input-length b0c6528 Use boolbvt for getting counter examples 5b3a1a4 Remove unnecessary replace_expr a630bb7 Correct bound in test with long string e4cf694 Bugfix: Java symbol types must have mode ID_java e158bb4 Bugfix: Java array symbols must have mode ID_java d475abc Reset namespace after symbolic execution 1ef0f41 Add --flush option to flush all output git-subtree-dir: cbmc git-subtree-split: 20e7bca
1 parent 2f21b81 commit ee73846

File tree

367 files changed

+5583
-7143
lines changed

Some content is hidden

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

367 files changed

+5583
-7143
lines changed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ Release/*
3030
*.lib
3131
src/ansi-c/arm_builtin_headers.inc
3232
src/ansi-c/clang_builtin_headers.inc
33+
src/ansi-c/cprover_builtin_headers.inc
3334
src/ansi-c/cprover_library.inc
3435
src/ansi-c/cw_builtin_headers.inc
36+
src/ansi-c/gcc_builtin_headers_types.inc
3537
src/ansi-c/gcc_builtin_headers_alpha.inc
3638
src/ansi-c/gcc_builtin_headers_arm.inc
3739
src/ansi-c/gcc_builtin_headers_generic.inc
@@ -46,6 +48,7 @@ src/ansi-c/gcc_builtin_headers_tm.inc
4648
src/ansi-c/gcc_builtin_headers_mips.inc
4749
src/ansi-c/gcc_builtin_headers_power.inc
4850
src/ansi-c/gcc_builtin_headers_ubsan.inc
51+
src/ansi-c/windows_builtin_headers.inc
4952
src/java_bytecode/java_core_models.inc
5053

5154
# regression/test files
@@ -104,8 +107,8 @@ src/goto-instrument/goto-instrument.exe
104107
src/jbmc/jbmc
105108
src/musketeer/musketeer
106109
src/musketeer/musketeer.exe
107-
src/solvers/smt2/smt2_solver
108-
src/solvers/smt2/smt2_solver.exe
110+
src/solvers/smt2_solver
111+
src/solvers/smt2_solver.exe
109112
src/symex/symex
110113
src/symex/symex.exe
111114
src/goto-diff/goto-diff

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ jobs:
3838
script: scripts/travis_lint.sh
3939
before_cache:
4040

41+
- &string-table-check
42+
stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
43+
env: NAME="string-table"
44+
install:
45+
script: scripts/string_table_check.sh
46+
before_cache:
47+
4148
- stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
4249
env: NAME="DOXYGEN-CHECK"
4350
addons:
@@ -279,3 +286,14 @@ script:
279286

280287
before_cache:
281288
- ccache -s
289+
290+
notifications:
291+
webhooks:
292+
urls:
293+
- http://dashboard.diffblue.com/api/travis-webhooks
294+
on_success: always
295+
on_failure: always
296+
on_start: never
297+
on_cancel: never
298+
on_error: always
299+

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
generate bodies for functions that don't have a body
55
in the goto code. This supercedes the functionality
66
of --undefined-function-is-assume-false
7+
* The --fixedbv command-line option has been removed
8+
(it was marked deprecated in January 2017)
9+
710

811
5.8
912
===

CODING_STANDARD.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ Formatting is enforced using clang-format. For more information about this, see
1919
- Nested function calls do not need to be broken up into separate lines
2020
even if the outer function call does.
2121
- If a method is bigger than 50 lines, break it into parts.
22-
- Put matching `{ }` into the same column.
22+
- Put matching `{ }` into the same column, except for initializer lists and
23+
lambdas, where you should place `{` directly after the closing `)`. This is
24+
to comply with clang-format, which doesn't support aligned curly braces in
25+
these cases.
2326
- Spaces around binary operators (`=`, `+`, `==` ...)
2427
- Space after comma (parameter lists, argument lists, ...)
2528
- Space after colon inside `for`

regression/ansi-c/float_constant1/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ STATIC_ASSERT(0X1.0P-95F == 2.524355e-29f);
1010
// nothing before the dot
1111
STATIC_ASSERT(0X.0p+1f == 0);
1212

13+
// 32-bit, 64-bit and 128-bit constants, GCC proper only,
14+
// clang doesn't have it
15+
#if defined(__GNUC__) && !defined(__clang__)
16+
STATIC_ASSERT(__builtin_types_compatible_p(_Float32, __typeof(1.0f32)));
17+
STATIC_ASSERT(__builtin_types_compatible_p(_Float64, __typeof(1.0f64)));
18+
STATIC_ASSERT(__builtin_types_compatible_p(_Float128, __typeof(1.0f128)));
19+
STATIC_ASSERT(__builtin_types_compatible_p(_Float32x, __typeof(1.0f32x)));
20+
STATIC_ASSERT(__builtin_types_compatible_p(_Float64x, __typeof(1.0f64x)));
21+
STATIC_ASSERT(__builtin_types_compatible_p(_Float128x, __typeof(1.0f128x)));
22+
#endif
23+
1324
#ifdef __GNUC__
1425
_Complex c;
1526
#endif

regression/ansi-c/gcc_types_compatible_p1/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ STATIC_ASSERT(!__builtin_types_compatible_p(unsigned, signed));
9797

9898
#ifndef __clang__
9999
// clang doesn't have these
100+
STATIC_ASSERT(!__builtin_types_compatible_p(_Float32, float));
101+
STATIC_ASSERT(!__builtin_types_compatible_p(_Float64, double));
102+
STATIC_ASSERT(!__builtin_types_compatible_p(_Float32x, float));
103+
STATIC_ASSERT(!__builtin_types_compatible_p(_Float64x, double));
100104
STATIC_ASSERT(!__builtin_types_compatible_p(__float80, double));
101105
STATIC_ASSERT(!__builtin_types_compatible_p(__float128, long double));
102106
STATIC_ASSERT(!__builtin_types_compatible_p(__float128, double));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include <stdlib.h>
2+
#include <pthread.h>
3+
4+
_Bool set_done;
5+
int *ptr;
6+
7+
void *set_x(void *arg)
8+
{
9+
*(int *)arg = 10;
10+
set_done = 1;
11+
}
12+
13+
int main(int argc, char *argv[])
14+
{
15+
__CPROVER_assume(argc >= sizeof(int));
16+
ptr = malloc(argc);
17+
__CPROVER_ASYNC_1: set_x(ptr);
18+
__CPROVER_assume(set_done);
19+
assert(*ptr == 10);
20+
return 0;
21+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
add_test_pl_tests(
2+
"$<TARGET_FILE:jbmc>"
3+
)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
default: tests.log
2+
3+
test:
4+
@../test.pl -p -c ../../../src/jbmc/jbmc
5+
6+
tests.log: ../test.pl
7+
@../test.pl -p -c ../../../src/jbmc/jbmc
8+
9+
show:
10+
@for dir in *; do \
11+
if [ -d "$$dir" ]; then \
12+
vim -o "$$dir/*.java" "$$dir/*.out"; \
13+
fi; \
14+
done;
15+
16+
clean:
17+
find -name '*.out' -execdir $(RM) '{}' \;
18+
find -name '*.gb' -execdir $(RM) '{}' \;
19+
$(RM) tests.log
20+
21+
%.class: %.java ../../src/org.cprover.jar
22+
javac -g -cp ../../src/org.cprover.jar:. $<
23+
24+
nondet_java_files := $(shell find . -name "Nondet*.java")
25+
nondet_class_files := $(patsubst %.java, %.class, $(nondet_java_files))
26+
27+
.PHONY: nondet-class-files
28+
nondet-class-files: $(nondet_class_files)
29+
30+
.PHONY: clean-nondet-class-files
31+
clean-nondet-class-files:
32+
-rm $(nondet_class_files)
Binary file not shown.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import java.lang.Thread;
2+
import org.cprover.CProver;
3+
4+
public class A
5+
{
6+
static int x = 0;
7+
8+
// verification success
9+
public void me()
10+
{
11+
x = 5;
12+
CProver.startThread(333);
13+
x = 10;
14+
CProver.endThread(333);
15+
assert(x == 5 || x == 10);
16+
}
17+
18+
// verification failed
19+
public void me2()
20+
{
21+
x = 5;
22+
CProver.startThread(333);
23+
x = 10;
24+
CProver.endThread(333);
25+
assert(x == 10);
26+
}
27+
28+
// Known-bug, thread id mismatch, this should be detected by the conversation
29+
// process. It is currently not and thus will result in an assertion violation
30+
// during symbolic execution.
31+
public void me3()
32+
{
33+
x = 5;
34+
CProver.startThread(22333);
35+
x = 10;
36+
CProver.endThread(333);
37+
assert(x == 10);
38+
}
39+
40+
// Known-bug, see: https://github.com/diffblue/cbmc/issues/1630
41+
public void me4()
42+
{
43+
int x2 = 10;
44+
CProver.startThread(22333);
45+
x = x2;
46+
assert(x == 10);
47+
CProver.endThread(333);
48+
}
49+
50+
// Known-bug, symex cannot handle nested thread-blocks
51+
public void me5()
52+
{
53+
CProver.startThread(333);
54+
x = 5;
55+
CProver.startThread(222);
56+
x = 8;
57+
CProver.endThread(222);
58+
CProver.endThread(333);
59+
assert(x == 5 || x == 0 || x == 8);
60+
}
61+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
A.class
3+
--function "A.me:()V" --lazy-methods --java-threading
4+
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
^VERIFICATION SUCCESSFUL
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CORE
2+
A.class
3+
--function "A.me2:()V" --lazy-methods --java-threading
4+
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED
Binary file not shown.
624 Bytes
Binary file not shown.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@interface FieldAnnotation {
2+
}
3+
4+
public class Test {
5+
@FieldAnnotation
6+
public static double d;
7+
8+
public void check() {
9+
double f = d;
10+
assert(f == d);
11+
assert(f != d);
12+
}
13+
}
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.check
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
assertion at file Test.java line 10 .* SUCCESS
7+
assertion at file Test.java line 11 .* FAILURE
8+
--
9+
--
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public class A {
2+
public float a;
3+
}
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
public class FloatMultidim1 {
2+
public float[][] f(int y) {
3+
if (y > 0 && y < 5) {
4+
float[][] a1 = new float[y][2];
5+
int j;
6+
if (y > 1) {
7+
j = 1;
8+
} else {
9+
j = 0;
10+
}
11+
a1[j][1] = 1.0f;
12+
return a1;
13+
} else {
14+
return null;
15+
}
16+
}
17+
}
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
public class FloatMultidim2 {
2+
public float[][] f(int y) {
3+
if (y > 0 && y < 5) {
4+
float[][] a1 = new float[2][y];
5+
int j;
6+
if (y > 1) {
7+
j = 1;
8+
} else {
9+
j = 0;
10+
}
11+
a1[1][j] = 1.0f;
12+
return a1;
13+
} else {
14+
return new float[1][1];
15+
}
16+
}
17+
}
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class RefMultidim1 {
2+
public A[][] f(int y) {
3+
if (y > 0 && y < 5) {
4+
A[][] a1 = new A[y][2];
5+
int j;
6+
if (y > 1) {
7+
j = 1;
8+
} else {
9+
j = 0;
10+
}
11+
a1[j][1] = new A();
12+
a1[j][1].a = 1.0f;
13+
return a1;
14+
} else {
15+
return null;
16+
}
17+
}
18+
}
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class RefMultidim2 {
2+
public A[][] f(int y) {
3+
if (y > 0 && y < 5) {
4+
A[][] a1 = new A[2][y];
5+
int j;
6+
if (y > 1) {
7+
j = 1;
8+
} else {
9+
j = 0;
10+
}
11+
a1[1][j] = new A();
12+
a1[1][j].a = 1.0f;
13+
return a1;
14+
} else {
15+
return null;
16+
}
17+
}
18+
}
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
public class RefMultidimConstsize {
2+
public void f(int y) {
3+
A[][] a1 = new A[2][2];
4+
int j = 1;
5+
a1[j][1] = new A();
6+
a1[j][1].a = 1.0f;
7+
}
8+
}
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class RefSingledim {
2+
public A[] f(int y) {
3+
if (y > 0 && y < 5) {
4+
A[] a1 = new A[y];
5+
int j;
6+
if (y > 1) {
7+
j = 1;
8+
} else {
9+
j = 0;
10+
}
11+
a1[j] = new A();
12+
a1[j].a = 1.0f;
13+
return a1;
14+
} else {
15+
return null;
16+
}
17+
}
18+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
KNOWNBUG
2+
FloatMultidim1.class
3+
--function FloatMultidim1.f --cover location --unwind 3
4+
\d+ of \d+ covered
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
--
9+
This crashes during symex, with error 'cannot unpack array of nonconst size'
10+
when trying to access the element of the array. Symex uses byte_extract_little
11+
_endian to access the element which does not get simplified (it seems the
12+
problem is that the types in the instruction do not match). TG-1121

0 commit comments

Comments
 (0)