Skip to content

Commit abbb389

Browse files
author
Daniel Kroening
committed
bugfix: must do .update() after remove_returns
remove_returns inserts new instructions, and thus, .update() must be called.
1 parent 8a44f9a commit abbb389

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@ int goto_instrument_parse_optionst::doit()
447447
if(cmdline.isset("check-call-sequence"))
448448
{
449449
do_remove_returns();
450+
451+
// recalculate numbers, etc.
452+
goto_model.goto_functions.update();
453+
450454
check_call_sequence(goto_model);
451455
return CPROVER_EXIT_SUCCESS;
452456
}
@@ -1443,6 +1447,9 @@ void goto_instrument_parse_optionst::instrument_goto_program()
14431447
{
14441448
do_indirect_call_and_rtti_removal();
14451449

1450+
// recalculate numbers, etc.
1451+
goto_model.goto_functions.update();
1452+
14461453
status() << "Performing a reachability slice" << eom;
14471454
if(cmdline.isset("property"))
14481455
reachability_slicer(goto_model, cmdline.get_values("property"));
@@ -1454,6 +1461,9 @@ void goto_instrument_parse_optionst::instrument_goto_program()
14541461
{
14551462
do_indirect_call_and_rtti_removal();
14561463

1464+
// recalculate numbers, etc.
1465+
goto_model.goto_functions.update();
1466+
14571467
status() << "Performing a function pointer reachability slice" << eom;
14581468
function_path_reachability_slicer(
14591469
goto_model, cmdline.get_comma_separated_values("fp-reachability-slice"));
@@ -1465,6 +1475,9 @@ void goto_instrument_parse_optionst::instrument_goto_program()
14651475
do_indirect_call_and_rtti_removal();
14661476
do_remove_returns();
14671477

1478+
// recalculate numbers, etc.
1479+
goto_model.goto_functions.update();
1480+
14681481
status() << "Performing a full slice" << eom;
14691482
if(cmdline.isset("property"))
14701483
property_slicer(goto_model, cmdline.get_values("property"));

0 commit comments

Comments
 (0)