Skip to content

Commit

Permalink
Prevent attempting to load any class twice
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanJPhillips committed Mar 28, 2018
1 parent 7c1dfde commit b882670
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
KNOWNBUG
CORE
java/lang/Object.class

^EXIT=6$
Expand Down
6 changes: 6 additions & 0 deletions src/java_bytecode/java_bytecode_convert_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ void java_bytecode_convert_classt::operator()(
PRECONDITION(!parse_trees.empty());
const irep_idt &class_name = parse_trees.front().parsed_class.name;

if (symbol_table.has_symbol("java::" + id2string(class_name)))
{
debug() << "Skip class " << class_name << " (already loaded)" << eom;
return;
}

// Add array types to the symbol table
add_array_types(symbol_table);

Expand Down

0 comments on commit b882670

Please sign in to comment.