• Home
  • Raw
  • Download

Lines Matching refs:Sym

324   bool isReleased(SymbolRef Sym, CheckerContext &C) const;
326 bool checkUseAfterFree(SymbolRef Sym, CheckerContext &C, const Stmt *S) const;
328 void checkUseZeroAllocated(SymbolRef Sym, CheckerContext &C,
331 bool checkDoubleDelete(SymbolRef Sym, CheckerContext &C) const;
363 Optional<CheckKind> getCheckIfTracked(CheckerContext &C, SymbolRef Sym,
374 SymbolRef Sym, bool OwnershipTransferred) const;
379 SymbolRef Sym) const;
381 SymbolRef Sym, SymbolRef PrevSym) const;
383 void ReportDoubleDelete(CheckerContext &C, SymbolRef Sym) const;
386 SymbolRef Sym) const;
390 LeakInfo getAllocationSite(const ExplodedNode *N, SymbolRef Sym,
393 void reportLeak(SymbolRef Sym, ExplodedNode *N, CheckerContext &C) const;
407 SymbolRef Sym; member in __anon42261f860111::MallocChecker::MallocBugVisitor
419 : Sym(S), Mode(Normal), FailedReallocSymbol(nullptr), IsLeak(isLeak) {} in MallocBugVisitor()
424 ID.AddPointer(Sym); in Profile()
901 SymbolRef Sym = retVal.getAsLocSymbol(); in ProcessZeroAllocation() local
902 if (!Sym) in ProcessZeroAllocation()
905 const RefState *RS = State->get<RegionState>(Sym); in ProcessZeroAllocation()
908 return TrueState->set<RegionState>(Sym, in ProcessZeroAllocation()
917 return TrueState->add<ReallocSizeZeroSymbols>(Sym); in ProcessZeroAllocation()
968 if (SymbolRef Sym = C.getSVal(*I).getAsSymbol()) in checkPostStmt() local
969 checkUseAfterFree(Sym, C, *I); in checkPostStmt()
993 if (SymbolRef Sym = C.getSVal(DE->getArgument()).getAsSymbol()) in checkPreStmt() local
994 checkUseAfterFree(Sym, C, DE->getArgument()); in checkPreStmt()
1138 SymbolRef Sym = retVal.getAsLocSymbol(); in MallocUpdateRefState() local
1139 assert(Sym); in MallocUpdateRefState()
1142 return State->set<RegionState>(Sym, RefState::getAllocated(Family, E)); in MallocUpdateRefState()
1187 SymbolRef Sym, SymbolRef &RetStatusSymbol) { in didPreviousFreeFail() argument
1188 const SymbolRef *Ret = State->get<FreeReturnValue>(Sym); in didPreviousFreeFail()
1501 MallocChecker::getCheckIfTracked(CheckerContext &C, SymbolRef Sym, in getCheckIfTracked() argument
1503 if (C.getState()->contains<ReallocSizeZeroSymbols>(Sym)) in getCheckIfTracked()
1506 const RefState *RS = C.getState()->get<RegionState>(Sym); in getCheckIfTracked()
1674 SymbolRef Sym, in ReportMismatchedDealloc() argument
1718 R->markInteresting(Sym); in ReportMismatchedDealloc()
1720 R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym)); in ReportMismatchedDealloc()
1783 SymbolRef Sym) const { in ReportUseAfterFree()
1789 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportUseAfterFree()
1801 R->markInteresting(Sym); in ReportUseAfterFree()
1803 R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym)); in ReportUseAfterFree()
1809 bool Released, SymbolRef Sym, in ReportDoubleFree() argument
1816 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportDoubleFree()
1831 R->markInteresting(Sym); in ReportDoubleFree()
1834 R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym)); in ReportDoubleFree()
1839 void MallocChecker::ReportDoubleDelete(CheckerContext &C, SymbolRef Sym) const { in ReportDoubleDelete()
1844 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportDoubleDelete()
1856 R->markInteresting(Sym); in ReportDoubleDelete()
1857 R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym)); in ReportDoubleDelete()
1864 SymbolRef Sym) const { in ReportUseZeroAllocated()
1870 Optional<MallocChecker::CheckKind> CheckKind = getCheckIfTracked(C, Sym); in ReportUseZeroAllocated()
1884 if (Sym) { in ReportUseZeroAllocated()
1885 R->markInteresting(Sym); in ReportUseZeroAllocated()
1886 R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym)); in ReportUseZeroAllocated()
2017 MallocChecker::getAllocationSite(const ExplodedNode *N, SymbolRef Sym, in getAllocationSite() argument
2027 if (!State->get<RegionState>(Sym)) in getAllocationSite()
2035 if (Val.getAsLocSymbol() == Sym) { in getAllocationSite()
2058 void MallocChecker::reportLeak(SymbolRef Sym, ExplodedNode *N, in reportLeak() argument
2065 const RefState *RS = C.getState()->get<RegionState>(Sym); in reportLeak()
2096 std::tie(AllocNode, Region) = getAllocationSite(N, Sym, C); in reportLeak()
2121 R->markInteresting(Sym); in reportLeak()
2122 R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym, true)); in reportLeak()
2185 SymbolRef Sym = DC->getCXXThisVal().getAsSymbol(); in checkPreCall() local
2186 if (!Sym || checkDoubleDelete(Sym, C)) in checkPreCall()
2210 SymbolRef Sym = CC->getCXXThisVal().getAsSymbol(); in checkPreCall() local
2211 if (!Sym || checkUseAfterFree(Sym, C, CC->getCXXThisExpr())) in checkPreCall()
2219 SymbolRef Sym = ArgSVal.getAsSymbol(); in checkPreCall() local
2220 if (!Sym) in checkPreCall()
2222 if (checkUseAfterFree(Sym, C, Call.getArgExpr(I))) in checkPreCall()
2236 SymbolRef Sym = RetVal.getAsSymbol(); in checkPreStmt() local
2237 if (!Sym) in checkPreStmt()
2245 Sym = BMR->getSymbol(); in checkPreStmt()
2248 if (Sym) in checkPreStmt()
2249 checkUseAfterFree(Sym, C, E); in checkPreStmt()
2292 bool MallocChecker::isReleased(SymbolRef Sym, CheckerContext &C) const { in isReleased() argument
2293 assert(Sym); in isReleased()
2294 const RefState *RS = C.getState()->get<RegionState>(Sym); in isReleased()
2298 bool MallocChecker::checkUseAfterFree(SymbolRef Sym, CheckerContext &C, in checkUseAfterFree() argument
2301 if (isReleased(Sym, C)) { in checkUseAfterFree()
2302 ReportUseAfterFree(C, S->getSourceRange(), Sym); in checkUseAfterFree()
2309 void MallocChecker::checkUseZeroAllocated(SymbolRef Sym, CheckerContext &C, in checkUseZeroAllocated() argument
2311 assert(Sym); in checkUseZeroAllocated()
2313 if (const RefState *RS = C.getState()->get<RegionState>(Sym)) { in checkUseZeroAllocated()
2315 ReportUseZeroAllocated(C, RS->getStmt()->getSourceRange(), Sym); in checkUseZeroAllocated()
2317 else if (C.getState()->contains<ReallocSizeZeroSymbols>(Sym)) { in checkUseZeroAllocated()
2318 ReportUseZeroAllocated(C, S->getSourceRange(), Sym); in checkUseZeroAllocated()
2322 bool MallocChecker::checkDoubleDelete(SymbolRef Sym, CheckerContext &C) const { in checkDoubleDelete() argument
2324 if (isReleased(Sym, C)) { in checkDoubleDelete()
2325 ReportDoubleDelete(C, Sym); in checkDoubleDelete()
2334 SymbolRef Sym = l.getLocSymbolInBase(); in checkLocation() local
2335 if (Sym) { in checkLocation()
2336 checkUseAfterFree(Sym, C, S); in checkLocation()
2337 checkUseZeroAllocated(Sym, C, S); in checkLocation()
2625 const RefState *RS = state->get<RegionState>(Sym); in VisitNode()
2626 const RefState *RSPrev = statePrev->get<RegionState>(Sym); in VisitNode()
2656 StackHint = new StackHintGeneratorForSymbol(Sym, in VisitNode()
2660 StackHint = new StackHintGeneratorForSymbol(Sym, in VisitNode()
2664 StackHint = new StackHintGeneratorForSymbol(Sym, ""); in VisitNode()
2668 StackHint = new StackHintGeneratorForReallocationFailed(Sym, in VisitNode()
2688 StackHint = new StackHintGeneratorForSymbol(Sym, in VisitNode()