
IDA plugin: Fix SIGSEGV in CallGraph::IsLibrary when viewing flow graphs
When diff results are loaded from disk (is_incomplete() == true),
Results::PrepareVisualDiff was experiencing a segmentation fault:
1. primary and secondary std::unique_ptr<FlowGraph> were declared inside
the if (is_incomplete()) block, causing them to be destroyed prior
to database writing. Their destructor detached them from the call
graph and set call_graph_ to null.
2. database_writer->Write was passed member variables flow_graphs1_,
flow_graphs2_, and fixed_points_ instead of the local variables
containing only the selected function pair.
Extend the lifetime of primary and secondary across PrepareVisualDiff
and pass the local flow_graphs1, flow_graphs2, and fixed_points to
database_writer->Write.
PiperOrigin-RevId: 977992480
Change-Id: I35d4867cb6c76b30a3d9e94ec89ae6a9d2056821