diff --git a/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESecureHeapPropagation.cpp b/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESecureHeapPropagation.cpp index a068537877..225b701fa5 100644 --- a/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESecureHeapPropagation.cpp +++ b/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESecureHeapPropagation.cpp @@ -87,9 +87,10 @@ IDESecureHeapPropagation::getCallToRetFlowFunction( // Change to CallSite everywhere const auto *CS = llvm::cast(CallSite); - auto FName = CS->getCalledFunction()->getName(); - if (FName == InitializerFn) { - return generateFromZero(SecureHeapFact::INITIALIZED); + if (const auto *Callee = CS->getCalledFunction()) { + if (Callee->getName() == InitializerFn) { + return generateFromZero(SecureHeapFact::INITIALIZED); + } } return identityFlow(); } @@ -147,7 +148,7 @@ IDESecureHeapPropagation::getCallToRetEdgeFunction( return SHPGenEdgeFn{l_t::INITIALIZED}; } const auto *CS = llvm::cast(CallSite); - if (CallNode != ZeroValue && + if (CallNode != ZeroValue && CS->getCalledFunction() && CS->getCalledFunction()->getName() == ShutdownFn) { // std::cerr << "Kill at " << llvmIRToShortString(callSite) << std::endl; return SHPGenEdgeFn{l_t::BOT};