Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ mapFactsToCallee(const llvm::CallBase *CallSite, const llvm::Function *DestFun,
llvm::Function::const_arg_iterator ParamIt = DestFun->arg_begin();
llvm::Function::const_arg_iterator ParamEnd = DestFun->arg_end();

if (ParamIt != ParamEnd && (*ParamIt).hasStructRetAttr()) {
// sret parameters are writeonly
++ParamIt;
++ArgIt;
}

for (; ParamIt != ParamEnd; ++ParamIt, ++ArgIt) {
if (std::invoke(PropArg, ArgIt->get(), Source)) {
Res.insert(std::invoke(FactConstructor, &*ParamIt));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ class IFDSTaintAnalysis
bool isSanitizerCall(const llvm::CallBase *CB,
const llvm::Function *Callee) const;

void populateWithMayAliases(std::set<d_t> &Facts) const;
void populateWithMustAliases(std::set<d_t> &Facts) const;
void populateWithMayAliases(container_type &Facts,
const llvm::Instruction *Context) const;
void populateWithMustAliases(container_type &Facts,
const llvm::Instruction *Context) const;
};
} // namespace psr

Expand Down
Loading