Skip to content

Commit c8642dc

Browse files
author
Daniel Kroening
committed
do not attempt to havoc void-typed objects; fixes issue #2663
1 parent 05993f4 commit c8642dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/goto-programs/generate_function_bodies.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ class havoc_generate_function_bodiest : public generate_function_bodiest,
271271
if(
272272
parameter.type().id() == ID_pointer &&
273273
std::regex_match(
274-
id2string(parameter.get_base_name()), parameters_to_havoc))
274+
id2string(parameter.get_base_name()), parameters_to_havoc) &&
275+
parameter.type().subtype().id() != ID_empty)
275276
{
276277
// if (param != nullptr) { *param = nondet(); }
277278
auto goto_instruction = add_instruction();

0 commit comments

Comments
 (0)