Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of unbalanced returns for IIA #664

Merged
merged 7 commits into from
Sep 6, 2023
4 changes: 2 additions & 2 deletions include/phasar/DataFlow/IfdsIde/Solver/IDESolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,8 @@ class IDESolver
// conditionally generated values should only
// be propagated into callers that have an incoming edge for this
// condition
if (SolverConfig.followReturnsPastSeeds() && Inc.empty() &&
IDEProblem.isZeroValue(d1)) {
if (SolverConfig.followReturnsPastSeeds() && Inc.empty() /*&&
IDEProblem.isZeroValue(d1)*/) {
const auto &Callers = ICF->getCallersOf(FunctionThatNeedsSummary);
for (n_t Caller : Callers) {
for (n_t RetSiteC : ICF->getReturnSitesOfCallAt(Caller)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,9 @@ class IDEInstInteractionAnalysisT
n_t /* RetSite */) override {
// Map return value back to the caller. If pointer parameters hold at the
// end of a callee function generate all of those in the caller context.

if (CallSite == nullptr) {
return killAllFlows<d_t>();
}
auto MapFactsToCallerFF =
mapFactsToCaller<d_t>(llvm::cast<llvm::CallBase>(CallSite), ExitInst,
{}, [](const llvm::Value *RetVal, d_t Src) {
Expand Down