Skip to content

Commit bace8c1

Browse files
authored
Merge pull request diffblue#452 from diffblue/HACK_avoiding_invariant_failure_due_to_inconsitency_in_goto
SEC-450: HACK: Avoiding invariant failure due to inconsitency in GOTO program.
2 parents 17052cf + cea995a commit bace8c1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/taint-slicer/instrumenter.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,14 @@ exprt taint_instrumentert::drive_access_path_through_super_classes(
368368
fixed_struct_type=to_struct_type(
369369
get_instrumented_symbol_table().lookup_ref(member_type_name).type);
370370
}
371+
// The following 'if' statement is a HACK. It is a temporary hot-fix for
372+
// inconsistency between the symbol table and GOTO instructions, when
373+
// translating generics; see SEC-450 for more details.
374+
if(member_expr->get_component_name() == "@java.lang.Object" &&
375+
fixed_struct_type.get_tag() == "java.lang.Object")
376+
{
377+
return fixed_compound;
378+
}
371379
INVARIANT(fixed_struct_type.has_component(
372380
member_expr->get_component_name()),
373381
"The member must exist now (either the original or the super variable).");

0 commit comments

Comments
 (0)