Skip to content

Commit 56307d0

Browse files
author
Daniel Kroening
authored
Merge pull request #1050 from mgudemann/fix/revert_assert_non_nil_decl_assign_json_trace
Fix/revert assert non nil decl assign json trace
2 parents d325431 + 82642b9 commit 56307d0

File tree

8 files changed

+41
-1
lines changed

8 files changed

+41
-1
lines changed
234 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
test.class
3+
--json-ui --trace
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
.*VERIFICATION FAILED.*
7+
--
8+
^warning: ignoring
9+
--
10+
this fails with assertion error if nil values are not allowed in assignments in
11+
the JSON trace
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+

src/goto-programs/json_goto_trace.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ void convert(
208208
type_string=from_type(ns, identifier, symbol->type);
209209

210210
json_assignment["mode"]=json_stringt(id2string(symbol->mode));
211-
assert(step.full_lhs_value.is_not_nil());
212211
exprt simplified=simplify_array_access(step.full_lhs_value);
213212
full_lhs_value=json(simplified, ns, symbol->mode);
214213
}

0 commit comments

Comments
 (0)