Skip to content

Commit 50d161c

Browse files
committed
ignore recursion set if class is subtype
1 parent a0e251f commit 50d161c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/java_bytecode/java_object_factory.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,9 @@ void java_object_factoryt::gen_nondet_init(
190190
{
191191
const struct_typet &struct_type=to_struct_type(subtype);
192192
const irep_idt struct_tag=struct_type.get_tag();
193-
194-
if(recursion_set.find(struct_tag)!=recursion_set.end())
193+
// set to null if found in recursion set and not a sub-type
194+
if(recursion_set.find(struct_tag)!=recursion_set.end() &&
195+
struct_tag==class_identifier)
195196
{
196197
// make null
197198
null_pointer_exprt null_pointer_expr(pointer_type);

0 commit comments

Comments
 (0)