Skip to content

Commit 3c7a671

Browse files
Look up for null pointer in array pool
make_char_array was returning a new symbol every time NULL was encountered which is a problem when we want to compare these symbols.
1 parent 32a4186 commit 3c7a671

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/solvers/refinement/string_constraint_generator_main.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,7 @@ array_string_exprt array_poolt::make_char_array_for_char_pointer(
220220
else if(
221221
char_pointer.id() == ID_constant &&
222222
to_constant_expr(char_pointer).get_value() == ID_NULL)
223-
{
224-
/// \todo Check if the case char_array_null occurs.
225-
array_typet array_type(
226-
char_array_type.subtype(),
227-
from_integer(0, to_array_type(char_array_type).size().type()));
228-
symbol_exprt array_sym = fresh_symbol("char_array_null", array_type);
229-
return to_array_string_expr(array_sym);
230-
}
223+
symbol_name = "char_array_null";
231224
else
232225
symbol_name = "unknown_char_array";
233226

0 commit comments

Comments
 (0)