Skip to content

Commit 637afdc

Browse files
author
Daniel Kroening
committed
read_goto_binary does not set the config
Fixes #2949 This enables auto-detecting the architecture of a goto-binary when performing transformations on it, e.g., with main.c: int main(){ char buffer[] = "a"; int x = strlen(buffer); return x; } the commands goto-cc -m32 -o main.gb main.c goto-instrument --add-library main.gb main2.gb now pass.
1 parent b7cf102 commit 637afdc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,14 +897,16 @@ void goto_instrument_parse_optionst::get_goto_program()
897897
{
898898
status() << "Reading GOTO program from `" << cmdline.args[0] << "'" << eom;
899899

900+
config.set(cmdline);
901+
900902
auto result = read_goto_binary(cmdline.args[0], get_message_handler());
901903

902904
if(!result.has_value())
903905
throw 0;
904906

905907
goto_model = std::move(result.value());
906908

907-
config.set(cmdline);
909+
config.set_from_symbol_table(goto_model.symbol_table);
908910
}
909911

910912
void goto_instrument_parse_optionst::instrument_goto_program()

0 commit comments

Comments
 (0)