Skip to content

Commit

Permalink
Stabilize clinit wrapper function type parameters
Browse files Browse the repository at this point in the history
Many accesses to the function type would add an
ID_parameters if it is not there, which can cause
inconsistencies in irep comparisons.
  • Loading branch information
peterschrammel committed Apr 17, 2018
1 parent 3cd8bf4 commit 0b3170d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/java_bytecode/java_static_initializers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ static void create_clinit_wrapper_symbols(
symbolt wrapper_method_symbol;
code_typet wrapper_method_type;
wrapper_method_type.return_type() = void_typet();
// Ensure the parameters property is there
// to avoid trouble in irept comparisons
wrapper_method_type.parameters();
wrapper_method_symbol.name = clinit_wrapper_name(class_name);
wrapper_method_symbol.pretty_name = wrapper_method_symbol.name;
wrapper_method_symbol.base_name = "clinit_wrapper";
Expand Down

0 comments on commit 0b3170d

Please sign in to comment.