Skip to content

Fix/revert assert non nil decl assign json trace #1050

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
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
Binary file added regression/cbmc-java/exceptions20/A.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions20/B.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions20/C.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions20/D.class
Binary file not shown.
Binary file added regression/cbmc-java/exceptions20/test.class
Binary file not shown.
11 changes: 11 additions & 0 deletions regression/cbmc-java/exceptions20/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CORE
test.class
--json-ui --trace
^EXIT=10$
^SIGNAL=0$
.*VERIFICATION FAILED.*
--
^warning: ignoring
--
this fails with assertion error if nil values are not allowed in assignments in
the JSON trace
30 changes: 30 additions & 0 deletions regression/cbmc-java/exceptions20/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;
}
}
}

1 change: 0 additions & 1 deletion src/goto-programs/json_goto_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ void convert(
type_string=from_type(ns, identifier, symbol->type);

json_assignment["mode"]=json_stringt(id2string(symbol->mode));
assert(step.full_lhs_value.is_not_nil());
exprt simplified=simplify_array_access(step.full_lhs_value);
full_lhs_value=json(simplified, ns, symbol->mode);
}
Expand Down