Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 1 | //===-- SimpleStreamChecker.cpp -----------------------------------------*- C++ -*--// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // Defines a checker for proper use of fopen/fclose APIs. |
| 11 | // - If a file has been closed with fclose, it should not be accessed again. |
| 12 | // Accessing a closed file results in undefined behavior. |
| 13 | // - If a file was opened with fopen, it must be closed with fclose before |
| 14 | // the execution ends. Failing to do so results in a resource leak. |
| 15 | // |
| 16 | //===----------------------------------------------------------------------===// |
| 17 | |
| 18 | #include "ClangSACheckers.h" |
| 19 | #include "clang/StaticAnalyzer/Core/Checker.h" |
| 20 | #include "clang/StaticAnalyzer/Core/BugReporter/BugType.h" |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 21 | #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 22 | #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" |
| 23 | |
| 24 | using namespace clang; |
| 25 | using namespace ento; |
| 26 | |
| 27 | namespace { |
| 28 | typedef llvm::SmallVector<SymbolRef, 2> SymbolVector; |
| 29 | |
| 30 | struct StreamState { |
Anna Zaks | 32133cf | 2012-10-31 02:32:41 +0000 | [diff] [blame] | 31 | private: |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 32 | enum Kind { Opened, Closed } K; |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 33 | StreamState(Kind InK) : K(InK) { } |
| 34 | |
Anna Zaks | 32133cf | 2012-10-31 02:32:41 +0000 | [diff] [blame] | 35 | public: |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 36 | bool isOpened() const { return K == Opened; } |
| 37 | bool isClosed() const { return K == Closed; } |
| 38 | |
| 39 | static StreamState getOpened() { return StreamState(Opened); } |
| 40 | static StreamState getClosed() { return StreamState(Closed); } |
| 41 | |
| 42 | bool operator==(const StreamState &X) const { |
| 43 | return K == X.K; |
| 44 | } |
| 45 | void Profile(llvm::FoldingSetNodeID &ID) const { |
| 46 | ID.AddInteger(K); |
| 47 | } |
| 48 | }; |
| 49 | |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 50 | class SimpleStreamChecker : public Checker<check::PostCall, |
| 51 | check::PreCall, |
Anna Zaks | 35d4a09 | 2012-11-06 04:20:57 +0000 | [diff] [blame^] | 52 | check::DeadSymbols, |
| 53 | check::Bind, |
| 54 | check::RegionChanges> { |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 55 | |
| 56 | mutable IdentifierInfo *IIfopen, *IIfclose; |
| 57 | |
Jordan Rose | 32f38c1 | 2012-11-01 00:18:41 +0000 | [diff] [blame] | 58 | OwningPtr<BugType> DoubleCloseBugType; |
| 59 | OwningPtr<BugType> LeakBugType; |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 60 | |
| 61 | void initIdentifierInfo(ASTContext &Ctx) const; |
| 62 | |
| 63 | void reportDoubleClose(SymbolRef FileDescSym, |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 64 | const CallEvent &Call, |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 65 | CheckerContext &C) const; |
| 66 | |
Jordan Rose | 32f38c1 | 2012-11-01 00:18:41 +0000 | [diff] [blame] | 67 | void reportLeaks(SymbolVector LeakedStreams, |
| 68 | CheckerContext &C, |
| 69 | ExplodedNode *ErrNode) const; |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 70 | |
Anna Zaks | 35d4a09 | 2012-11-06 04:20:57 +0000 | [diff] [blame^] | 71 | bool guaranteedNotToCloseFile(const CallEvent &Call) const; |
| 72 | |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 73 | public: |
Anna Zaks | 32133cf | 2012-10-31 02:32:41 +0000 | [diff] [blame] | 74 | SimpleStreamChecker(); |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 75 | |
| 76 | /// Process fopen. |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 77 | void checkPostCall(const CallEvent &Call, CheckerContext &C) const; |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 78 | /// Process fclose. |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 79 | void checkPreCall(const CallEvent &Call, CheckerContext &C) const; |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 80 | |
| 81 | void checkDeadSymbols(SymbolReaper &SymReaper, CheckerContext &C) const; |
Anna Zaks | 35d4a09 | 2012-11-06 04:20:57 +0000 | [diff] [blame^] | 82 | |
| 83 | /// Deal with symbol escape as a byproduct of a bind. |
| 84 | void checkBind(SVal location, SVal val, const Stmt*S, |
| 85 | CheckerContext &C) const; |
| 86 | |
| 87 | /// Deal with symbol escape as a byproduct of a region change. |
| 88 | ProgramStateRef |
| 89 | checkRegionChanges(ProgramStateRef state, |
| 90 | const StoreManager::InvalidatedSymbols *invalidated, |
| 91 | ArrayRef<const MemRegion *> ExplicitRegions, |
| 92 | ArrayRef<const MemRegion *> Regions, |
| 93 | const CallEvent *Call) const; |
| 94 | bool wantsRegionChangeUpdate(ProgramStateRef state) const { |
| 95 | return true; |
| 96 | } |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 97 | }; |
| 98 | |
| 99 | } // end anonymous namespace |
| 100 | |
| 101 | /// The state of the checker is a map from tracked stream symbols to their |
Anna Zaks | ac150f2 | 2012-10-30 04:17:18 +0000 | [diff] [blame] | 102 | /// state. Let's store it in the ProgramState. |
| 103 | REGISTER_MAP_WITH_PROGRAMSTATE(StreamMap, SymbolRef, StreamState) |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 104 | |
Anna Zaks | 35d4a09 | 2012-11-06 04:20:57 +0000 | [diff] [blame^] | 105 | namespace { |
| 106 | class StopTrackingCallback : public SymbolVisitor { |
| 107 | ProgramStateRef state; |
| 108 | public: |
| 109 | StopTrackingCallback(ProgramStateRef st) : state(st) {} |
| 110 | ProgramStateRef getState() const { return state; } |
| 111 | |
| 112 | bool VisitSymbol(SymbolRef sym) { |
| 113 | state = state->remove<StreamMap>(sym); |
| 114 | return true; |
| 115 | } |
| 116 | }; |
| 117 | } // end anonymous namespace |
| 118 | |
| 119 | |
Anna Zaks | 32133cf | 2012-10-31 02:32:41 +0000 | [diff] [blame] | 120 | SimpleStreamChecker::SimpleStreamChecker() : IIfopen(0), IIfclose(0) { |
| 121 | // Initialize the bug types. |
| 122 | DoubleCloseBugType.reset(new BugType("Double fclose", |
| 123 | "Unix Stream API Error")); |
| 124 | |
| 125 | LeakBugType.reset(new BugType("Resource Leak", |
| 126 | "Unix Stream API Error")); |
| 127 | // Sinks are higher importance bugs as well as calls to assert() or exit(0). |
| 128 | LeakBugType->setSuppressOnSink(true); |
| 129 | } |
| 130 | |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 131 | void SimpleStreamChecker::checkPostCall(const CallEvent &Call, |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 132 | CheckerContext &C) const { |
| 133 | initIdentifierInfo(C.getASTContext()); |
| 134 | |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 135 | if (!Call.isGlobalCFunction()) |
| 136 | return; |
| 137 | |
| 138 | if (Call.getCalleeIdentifier() != IIfopen) |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 139 | return; |
| 140 | |
| 141 | // Get the symbolic value corresponding to the file handle. |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 142 | SymbolRef FileDesc = Call.getReturnValue().getAsSymbol(); |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 143 | if (!FileDesc) |
| 144 | return; |
| 145 | |
| 146 | // Generate the next transition (an edge in the exploded graph). |
| 147 | ProgramStateRef State = C.getState(); |
| 148 | State = State->set<StreamMap>(FileDesc, StreamState::getOpened()); |
| 149 | C.addTransition(State); |
| 150 | } |
| 151 | |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 152 | void SimpleStreamChecker::checkPreCall(const CallEvent &Call, |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 153 | CheckerContext &C) const { |
| 154 | initIdentifierInfo(C.getASTContext()); |
| 155 | |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 156 | if (!Call.isGlobalCFunction()) |
| 157 | return; |
| 158 | |
| 159 | if (Call.getCalleeIdentifier() != IIfclose) |
| 160 | return; |
| 161 | |
| 162 | if (Call.getNumArgs() != 1) |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 163 | return; |
| 164 | |
| 165 | // Get the symbolic value corresponding to the file handle. |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 166 | SymbolRef FileDesc = Call.getArgSVal(0).getAsSymbol(); |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 167 | if (!FileDesc) |
| 168 | return; |
| 169 | |
| 170 | // Check if the stream has already been closed. |
| 171 | ProgramStateRef State = C.getState(); |
| 172 | const StreamState *SS = State->get<StreamMap>(FileDesc); |
Anna Zaks | bbb751a | 2012-10-31 22:17:48 +0000 | [diff] [blame] | 173 | if (SS && SS->isClosed()) { |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 174 | reportDoubleClose(FileDesc, Call, C); |
Anna Zaks | bbb751a | 2012-10-31 22:17:48 +0000 | [diff] [blame] | 175 | return; |
| 176 | } |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 177 | |
| 178 | // Generate the next transition, in which the stream is closed. |
| 179 | State = State->set<StreamMap>(FileDesc, StreamState::getClosed()); |
| 180 | C.addTransition(State); |
| 181 | } |
| 182 | |
Anna Zaks | edd07f4 | 2012-11-02 21:30:04 +0000 | [diff] [blame] | 183 | static bool isLeaked(SymbolRef Sym, const StreamState &SS, |
| 184 | bool IsSymDead, ProgramStateRef State) { |
| 185 | if (IsSymDead && SS.isOpened()) { |
| 186 | // If a symbol is NULL, assume that fopen failed on this path. |
| 187 | // A symbol should only be considered leaked if it is non-null. |
| 188 | ConstraintManager &CMgr = State->getConstraintManager(); |
| 189 | ConditionTruthVal OpenFailed = CMgr.isNull(State, Sym); |
| 190 | return !OpenFailed.isConstrainedTrue(); |
| 191 | } |
| 192 | return false; |
| 193 | } |
| 194 | |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 195 | void SimpleStreamChecker::checkDeadSymbols(SymbolReaper &SymReaper, |
| 196 | CheckerContext &C) const { |
| 197 | ProgramStateRef State = C.getState(); |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 198 | SymbolVector LeakedStreams; |
Anna Zaks | edd07f4 | 2012-11-02 21:30:04 +0000 | [diff] [blame] | 199 | StreamMapTy TrackedStreams = State->get<StreamMap>(); |
Anna Zaks | 360b29c | 2012-10-30 04:17:40 +0000 | [diff] [blame] | 200 | for (StreamMapTy::iterator I = TrackedStreams.begin(), |
Jordan Rose | ec8d420 | 2012-11-01 00:18:27 +0000 | [diff] [blame] | 201 | E = TrackedStreams.end(); I != E; ++I) { |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 202 | SymbolRef Sym = I->first; |
Anna Zaks | edd07f4 | 2012-11-02 21:30:04 +0000 | [diff] [blame] | 203 | bool IsSymDead = SymReaper.isDead(Sym); |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 204 | |
Anna Zaks | edd07f4 | 2012-11-02 21:30:04 +0000 | [diff] [blame] | 205 | // Collect leaked symbols. |
| 206 | if (isLeaked(Sym, I->second, IsSymDead, State)) |
| 207 | LeakedStreams.push_back(Sym); |
| 208 | |
| 209 | // Remove the dead symbol from the streams map. |
| 210 | if (IsSymDead) |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 211 | State = State->remove<StreamMap>(Sym); |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 212 | } |
| 213 | |
Anna Zaks | 32133cf | 2012-10-31 02:32:41 +0000 | [diff] [blame] | 214 | ExplodedNode *N = C.addTransition(State); |
| 215 | reportLeaks(LeakedStreams, C, N); |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 216 | } |
| 217 | |
| 218 | void SimpleStreamChecker::reportDoubleClose(SymbolRef FileDescSym, |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 219 | const CallEvent &Call, |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 220 | CheckerContext &C) const { |
| 221 | // We reached a bug, stop exploring the path here by generating a sink. |
| 222 | ExplodedNode *ErrNode = C.generateSink(); |
Anna Zaks | 32133cf | 2012-10-31 02:32:41 +0000 | [diff] [blame] | 223 | // If we've already reached this node on another path, return. |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 224 | if (!ErrNode) |
| 225 | return; |
| 226 | |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 227 | // Generate the report. |
| 228 | BugReport *R = new BugReport(*DoubleCloseBugType, |
| 229 | "Closing a previously closed file stream", ErrNode); |
Jordan Rose | 0c396d6 | 2012-11-02 23:49:35 +0000 | [diff] [blame] | 230 | R->addRange(Call.getSourceRange()); |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 231 | R->markInteresting(FileDescSym); |
Jordan Rose | 785950e | 2012-11-02 01:53:40 +0000 | [diff] [blame] | 232 | C.emitReport(R); |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 233 | } |
| 234 | |
Anna Zaks | 32133cf | 2012-10-31 02:32:41 +0000 | [diff] [blame] | 235 | void SimpleStreamChecker::reportLeaks(SymbolVector LeakedStreams, |
| 236 | CheckerContext &C, |
| 237 | ExplodedNode *ErrNode) const { |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 238 | // Attach bug reports to the leak node. |
Anna Zaks | bdbb17b | 2012-10-30 04:18:21 +0000 | [diff] [blame] | 239 | // TODO: Identify the leaked file descriptor. |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 240 | for (llvm::SmallVector<SymbolRef, 2>::iterator |
| 241 | I = LeakedStreams.begin(), E = LeakedStreams.end(); I != E; ++I) { |
| 242 | BugReport *R = new BugReport(*LeakBugType, |
| 243 | "Opened file is never closed; potential resource leak", ErrNode); |
Anna Zaks | bdbb17b | 2012-10-30 04:18:21 +0000 | [diff] [blame] | 244 | R->markInteresting(*I); |
Jordan Rose | 785950e | 2012-11-02 01:53:40 +0000 | [diff] [blame] | 245 | C.emitReport(R); |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 246 | } |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 247 | } |
| 248 | |
Anna Zaks | 35d4a09 | 2012-11-06 04:20:57 +0000 | [diff] [blame^] | 249 | // Check various ways a symbol can be invalidated. |
| 250 | // Stop tracking symbols when a value escapes as a result of checkBind. |
| 251 | // A value escapes in three possible cases: |
| 252 | // (1) We are binding to something that is not a memory region. |
| 253 | // (2) We are binding to a MemRegion that does not have stack storage |
| 254 | // (3) We are binding to a MemRegion with stack storage that the store |
| 255 | // does not understand. |
| 256 | void SimpleStreamChecker::checkBind(SVal loc, SVal val, const Stmt *S, |
| 257 | CheckerContext &C) const { |
| 258 | // Are we storing to something that causes the value to "escape"? |
| 259 | bool escapes = true; |
| 260 | ProgramStateRef state = C.getState(); |
| 261 | |
| 262 | if (loc::MemRegionVal *regionLoc = dyn_cast<loc::MemRegionVal>(&loc)) { |
| 263 | escapes = !regionLoc->getRegion()->hasStackStorage(); |
| 264 | |
| 265 | if (!escapes) { |
| 266 | // To test (3), generate a new state with the binding added. If it is |
| 267 | // the same state, then it escapes (since the store cannot represent |
| 268 | // the binding). Do this only if we know that the store is not supposed |
| 269 | // to generate the same state. |
| 270 | SVal StoredVal = state->getSVal(regionLoc->getRegion()); |
| 271 | if (StoredVal != val) |
| 272 | escapes = (state == (state->bindLoc(*regionLoc, val))); |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | // If our store can represent the binding and we aren't storing to something |
| 277 | // that doesn't have local storage then just return the state and |
| 278 | // continue as is. |
| 279 | if (!escapes) |
| 280 | return; |
| 281 | |
| 282 | // Otherwise, find all symbols referenced by 'val' that we are tracking |
| 283 | // and stop tracking them. |
| 284 | state = state->scanReachableSymbols<StopTrackingCallback>(val).getState(); |
| 285 | C.addTransition(state); |
| 286 | } |
| 287 | |
| 288 | bool SimpleStreamChecker::guaranteedNotToCloseFile(const CallEvent &Call) const{ |
| 289 | // If it's not in a system header, assume it might close a file. |
| 290 | if (!Call.isInSystemHeader()) |
| 291 | return false; |
| 292 | |
| 293 | // Handle cases where we know a buffer's /address/ can escape. |
| 294 | if (Call.argumentsMayEscape()) |
| 295 | return false; |
| 296 | |
| 297 | // Note, even though fclose closes the file, we do not list it here |
| 298 | // since the checker is modeling the call. |
| 299 | |
| 300 | return true; |
| 301 | } |
| 302 | |
| 303 | // If the symbol we are tracking is invalidated, do not track the symbol as |
| 304 | // we cannot reason about it anymore. |
| 305 | ProgramStateRef |
| 306 | SimpleStreamChecker::checkRegionChanges(ProgramStateRef State, |
| 307 | const StoreManager::InvalidatedSymbols *invalidated, |
| 308 | ArrayRef<const MemRegion *> ExplicitRegions, |
| 309 | ArrayRef<const MemRegion *> Regions, |
| 310 | const CallEvent *Call) const { |
| 311 | |
| 312 | if (!invalidated || invalidated->empty()) |
| 313 | return State; |
| 314 | |
| 315 | // If it's a call which might close the file, we assume that all regions |
| 316 | // (explicit and implicit) escaped. Otherwise, whitelist explicit pointers |
| 317 | // (the parameters to the call); we still can track them. |
| 318 | llvm::SmallPtrSet<SymbolRef, 8> WhitelistedSymbols; |
| 319 | if (!Call || guaranteedNotToCloseFile(*Call)) { |
| 320 | for (ArrayRef<const MemRegion *>::iterator I = ExplicitRegions.begin(), |
| 321 | E = ExplicitRegions.end(); I != E; ++I) { |
| 322 | if (const SymbolicRegion *R = (*I)->StripCasts()->getAs<SymbolicRegion>()) |
| 323 | WhitelistedSymbols.insert(R->getSymbol()); |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | for (StoreManager::InvalidatedSymbols::const_iterator I=invalidated->begin(), |
| 328 | E = invalidated->end(); I!=E; ++I) { |
| 329 | SymbolRef sym = *I; |
| 330 | if (WhitelistedSymbols.count(sym)) |
| 331 | continue; |
| 332 | // The symbol escaped. Optimistically, assume that the corresponding file |
| 333 | // handle will be closed somewhere else. |
| 334 | State = State->remove<StreamMap>(sym); |
| 335 | } |
| 336 | return State; |
| 337 | } |
| 338 | |
Anna Zaks | d65e55d | 2012-10-29 22:51:50 +0000 | [diff] [blame] | 339 | void SimpleStreamChecker::initIdentifierInfo(ASTContext &Ctx) const { |
| 340 | if (IIfopen) |
| 341 | return; |
| 342 | IIfopen = &Ctx.Idents.get("fopen"); |
| 343 | IIfclose = &Ctx.Idents.get("fclose"); |
| 344 | } |
| 345 | |
| 346 | void ento::registerSimpleStreamChecker(CheckerManager &mgr) { |
| 347 | mgr.registerChecker<SimpleStreamChecker>(); |
| 348 | } |