Saber Checker
The Saber subsystem implements source-sink bug checking on top of Lotus IR
and value-flow graphs.
Headers: include/Checker/Saber/
Implementation: lib/Checker/Saber/
Tool: lotus-saber in tools/checker/lotus-saber.cpp
Overview
Saber-style analysis tracks source-sink relationships over the sparse value-flow graph to detect resource-management bugs. In the current tree it is used primarily for memory leaks, double-free bugs, and file-descriptor leaks.
Main components
LeakCheckerchecks unmatched allocations and partial leaks.DoubleFreeCheckerreports repeated frees on the same path.FileCheckerhandles file-descriptor style resources.SaberCheckerAPIandSrcSnkSolverexpose reusable source-sink solving infrastructure.
Typical usage
./build/bin/lotus-saber input.bc
./build/bin/lotus-saber --all input.bc
./build/bin/lotus-saber --double-free --file input.bc
Behavior
With no explicit checker flags,
lotus-saberdefaults to leak checking.When multiple checks are enabled, the tool tries to build and reuse shared SVFG and ICFG state across checkers.
See also
See Checker Tools for the tool overview.
See Pulse Checker for a different memory-safety checker family.