需自行准备并匹配对应版本的 LLVM(README 列出支持 LLVM-4 至 LLVM-22);作为库使用时需参考 SVF-example 单独接入;Python 绑定需另装 SVF-Python 项目

SVF
SVF-tools活跃维护基于 LLVM 的源码静态值流分析框架,能做指针分析、依赖分析和缺陷检测,适合做代码审计和验证。
Static Value-Flow Analysis Framework for Source Code
基于 LLVM IR 的可复用静态值流分析框架,帮你搭建指针分析与内存检查工具
基于 LLVM 的源码静态值流分析框架,能做指针分析、依赖分析和缺陷检测,适合做代码审计和验证。
核心能力
- 提供 SVFIR 内存抽象与指向关系数据结构
- 支持域敏感、流敏感的全程序指针分析
- 提供按需驱动的流敏感上下文敏感指向分析
- 构建内存 SSA 形式并分析内存区域与副作用
- 内置 SABER 检测内存泄漏与重复释放
容易踩的坑
- SVF-3.3最新正式版2026-05-20 · 2026-05-20 02:35 UTC
What's Changed
- add svf-graphdb to docker_publish by @JasonZhongZexin in https://github.com/SVF-tools/SVF/pull/1780
- update llvm/svf version by @yuleisui in https://github.com/SVF-tools/SVF/pull/1782
- fix C++ this pointer for struct ret by @yuleisui in https://github.com/SVF-tools/SVF/pull/1783
- refactor AE, use worklist algorithm(naive) by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1786
- Add check for empty caller arguments in CHGBuilder::connectInheritEdgeViaCall by @mortkever in https://github.com/SVF-tools/SVF/pull/1788
- WIP: Baseline which can run big programs by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1789
- WTO help worklist by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1792
- Refactor worklist algorithm, PreAnalysis extraction by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1793
- [WIP] propagateToSuccessor by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1797
- Refactor/edge based propagation by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1801
- fix: guard against negative/out-of-bounds struct indices in computeGepOffset by @cjsrxzdyzds in https://github.com/SVF-tools/SVF/pull/1805
- Set correct ICFGNode for ValVar subclasses during SVFIR construction by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1804
- Refactor CallPE to phi-like MultiOpndStmt at FunEntryICFGNodeCallpe by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1808
- Semi-Sparse infrastructure (no semi-sparse loop handle) by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1809
- semi-sparse loop handling, cycle helpers, and dense fixes by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1810
- Port SVF to LLVM 21 by @cjsrxzdyzds in https://github.com/SVF-tools/SVF/pull/1815
- refactor Sparse Abstract Interpt by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1812
- Fix missing push() before pop() in SaberCondAllocator::isSatisfiable by @Patrickstarrrrr in https://github.com/SVF-tools/SVF/pull/1816
- fix: the entry point should be "svf_main" if using
-svf-mainby @hiruwaKS in https://github.com/SVF-tools/SVF/pull/1818 - Fix AE singleton destructor crash at program exit by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1822
- fix: replace wrnMsg with writeWrnMsg by @Khosro-Moeini in https://github.com/SVF-tools/SVF/pull/1823
- Model external APIs(like scanf) stores with top value by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1825
- Full Sparse by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1821
- Add AE function entry mode on latest master by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1826
- Remove quotes from AE no-main CI regex by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1827
New Contributors
- @mortkever made their first contribution in https://github.com/SVF-tools/SVF/pull/1788
- @cjsrxzdyzds made their first contribution in https://github.com/SVF-tools/SVF/pull/1805
- @Patrickstarrrrr made their first contribution in https://github.com/SVF-tools/SVF/pull/1816
- @hiruwaKS made their first contribution in https://github.com/SVF-tools/SVF/pull/1818
Full Changelog: https://github.com/SVF-tools/SVF/compare/SVF-3.2...SVF-3.3
- SVF-3.22025-12-17 · 2025-12-17 12:44 UTC
查看更新说明
What's Changed
- Bump LLVM to Version 18 by @zhixiao-zhang in https://github.com/SVF-tools/SVF/pull/1772
- remove redundancy of subNodes and repNode by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1725
- downgrade ubuntu version that compile LLVM from 24.04 to 20.04(x86)/2… by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1727
- fix allocate type id by @jumormt in https://github.com/SVF-tools/SVF/pull/1729
- Update README.md by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1730
- Remove PTA by @MingxiuWang in https://github.com/SVF-tools/SVF/pull/1733
- refactor certain header files by @jumormt in https://github.com/SVF-tools/SVF/pull/1736
- add xiao to AE author by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1737
- fix logic error for null dereference by @MingxiuWang in https://github.com/SVF-tools/SVF/pull/1743
- fix logical error by @MingxiuWang in https://github.com/SVF-tools/SVF/pull/1744
- remove comments of >> and << by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1746
- Fix abort in ObjTypeInference::inferObjType by @Khosro-Moeini in https://github.com/SVF-tools/SVF/pull/1748
- Refactor ae by @JoelYYoung in https://github.com/SVF-tools/SVF/pull/1723
- Fix join loop detection for joinSite instead of forkSite by @Xinlong-Wu in https://github.com/SVF-tools/SVF/pull/1754
- Unify BaseObjVar type with SVFVar type by @yuleisui in https://github.com/SVF-tools/SVF/pull/1759
- Modify MTA module by @JoelYYoung in https://github.com/SVF-tools/SVF/pull/1761
- Fix(#1765): Use thunk function as placeholder when it can't be resolved by @FXTi in https://github.com/SVF-tools/SVF/pull/1766
- Fix isSameThisPtrInConstructor for LLVM 15+ opaque pointers by @FXTi in https://github.com/SVF-tools/SVF/pull/1774
- Graph db final v5 by @JasonZhongZexin in https://github.com/SVF-tools/SVF/pull/1764
- update npm publish by @JasonZhongZexin in https://github.com/SVF-tools/SVF/pull/1776
- update svf publish action premission by @JasonZhongZexin in https://github.com/SVF-tools/SVF/pull/1777
- fix llvm version by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1778
New Contributors
- @Khosro-Moeini made their first contribution in https://github.com/SVF-tools/SVF/pull/1748
- @Xinlong-Wu made their first contribution in https://github.com/SVF-tools/SVF/pull/1754
- @FXTi made their first contribution in https://github.com/SVF-tools/SVF/pull/1766
- @zhixiao-zhang made their first contribution in https://github.com/SVF-tools/SVF/pull/1772
Full Changelog: https://github.com/SVF-tools/SVF/compare/SVF-3.1...SVF-3.2
- SVF-3.12025-06-05 · 2025-06-05 11:48 UTC
查看更新说明
This is a major release:
- Significant refactoring of SVF code to decouple SVF from LLVM
- New features for abstract execution
- Build system upgrade
- NPM upgrade
- Many other bug fixing and improvement
What's Changed
- update Dockerfile: lldb -> gdb by @jumormt in https://github.com/SVF-tools/SVF/pull/1471
- 16.0.0->16.0.4 by @jumormt in https://github.com/SVF-tools/SVF/pull/1472
- fix Dockerfile to support both x86 and arm64 by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1474
- Fix namespace by @Kaiqi-Liang in https://github.com/SVF-tools/SVF/pull/1476
- remove const reference when iterating a range by @jumormt in https://github.com/SVF-tools/SVF/pull/1477
- fixed an SFR bug by @kisslune in https://github.com/SVF-tools/SVF/pull/1479
- add LF check by @jumormt in https://github.com/SVF-tools/SVF/pull/1480
- Fix issue of global representation by @LeoneChen in https://github.com/SVF-tools/SVF/pull/1484
- fix #1490 Successors of BranchStmt are llvm intrinsic instructions by @yuleisui in https://github.com/SVF-tools/SVF/pull/1492
- fix issue 1493 by @junmeiRong in https://github.com/SVF-tools/SVF/pull/1494
- fix "int a[2] = {2, 2};" case by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1500
- Fix bit wise operator for bounded double by @jumormt in https://github.com/SVF-tools/SVF/pull/1508
- Refactor IntervalValue by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1510
- Try to call compiler built-in functions in
countTrailingZerosby @cubicYYY in https://github.com/SVF-tools/SVF/pull/1512 - upgrade codecov version by @JasonZhongZexin in https://github.com/SVF-tools/SVF/pull/1515
- fix obj type inference for c++ indirect call in constructors by @jumormt in https://github.com/SVF-tools/SVF/pull/1514
- Fix handling of llvm intrinsic instruction PCG.cpp by @JoelYYoung in https://github.com/SVF-tools/SVF/pull/1517
- fixed enum types of GenericBug implementations by @mxHuber in https://github.com/SVF-tools/SVF/pull/1521
- Stage1 : move Ass3 to SVF by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1519
- step1: remove preAbstrace and use use a temporary state to collect st… by @jumormt in https://github.com/SVF-tools/SVF/pull/1523
- rename PTACallGraph->CallGraph by @yuleisui in https://github.com/SVF-tools/SVF/pull/1526
- Refactor SVFInstruction in MTA by @yuleisui in https://github.com/SVF-tools/SVF/pull/1527
- refactor SVFInstruction stage 5 by @yuleisui in https://github.com/SVF-tools/SVF/pull/1528
- Stage2 : refactor buffer overflow by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1531
- add icfgnodelist field in basic block by @jumormt in https://github.com/SVF-tools/SVF/pull/1529
- Refactoring SVFInstruction: stage 6 by @yuleisui in https://github.com/SVF-tools/SVF/pull/1532
- Refactoring SVFInstruction: stage 7 by @yuleisui in https://github.com/SVF-tools/SVF/pull/1534
- refactor extAPIMap by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1533
- Remove CallSite : stage 1 by @yuleisui in https://github.com/SVF-tools/SVF/pull/1535
- Remove getCallee in AE by @yuleisui in https://github.com/SVF-tools/SVF/pull/1537
- stage 3: fix svf_assert, and make test cases more robust by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1542
- remove svfinstruction in isheapalloc by @jumormt in https://github.com/SVF-tools/SVF/pull/1538
- refactor AE, make new module of extapi handler by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1545
- fix for assignment by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1546
- fix cdg null deref by @jumormt in https://github.com/SVF-tools/SVF/pull/1551
- Refactor pta by @JoelYYoung in https://github.com/SVF-tools/SVF/pull/1552
- Remove SVFInstruction to node maps in ICFG by @jumormt in https://github.com/SVF-tools/SVF/pull/1547
- remove inst in intranode && remove some getCallsite by @jumormt in https://github.com/SVF-tools/SVF/pull/1556
- remove a redundant statement in setup.sh by @Rexxar-Jack-Remar in https:
- SVF-3.02024-05-28 · 2024-05-28 02:59 UTC
查看更新说明
This is a stable release of SVF for LLVM-16.0.0 with the following change:
- Fully support for opaque pointers
- Object type inference
- ExtAPI improvement
- Abstract Interpretation API refactoring
- Symbolic abstraction implementation improvement in abstract execution.
In our next release, SVF will support LLVM-17 or 18.
What's Changed
- Add opaque pointer in extapi by @shuangxiangkan in https://github.com/SVF-tools/SVF/pull/1355
- remove getbasevalvar in getgepval by @jumormt in https://github.com/SVF-tools/SVF/pull/1356
- Bump LLVM to Version 16 by @jumormt in https://github.com/SVF-tools/SVF/pull/1357
- use macos-latest for lib publish by @jumormt in https://github.com/SVF-tools/SVF/pull/1358
- fix npm by @jumormt in https://github.com/SVF-tools/SVF/pull/1359
- build extapi.bc before svfllvm by @jumormt in https://github.com/SVF-tools/SVF/pull/1361
- softlink brew llvm install path to SVFHOME/LLVMHOME by @jumormt in https://github.com/SVF-tools/SVF/pull/1362
- add AE stage 1 by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1360
- refactor / improve coverage / README by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1365
- update logo by @fengxxu in https://github.com/SVF-tools/SVF/pull/1368
- Fix incomplete/incorrect PTA when using C++ namespaces & virtual functions by @Johanmyst in https://github.com/SVF-tools/SVF/pull/1369
- add some comments for cpp type inference by @jumormt in https://github.com/SVF-tools/SVF/pull/1371
- move libSvfCore and libSvfLLVM files to lib folder by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1366
- fix npm bin folder by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1372
- update readme by @fengxxu in https://github.com/SVF-tools/SVF/pull/1373
- reduce copy include folder by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1377
- Fix incomplete/incorrect callgraphs due to incorrect class names by @Johanmyst in https://github.com/SVF-tools/SVF/pull/1376
- refactor obj type inference by @jumormt in https://github.com/SVF-tools/SVF/pull/1378
- Fix getMainLLVMModule() by @shuangxiangkan in https://github.com/SVF-tools/SVF/pull/1382
- UbuntuArmLLVM link is not added in build.sh by @guanqin-123 in https://github.com/SVF-tools/SVF/pull/1383
- Ae convert CFBBG to ICFG by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1384
- pull before formatting by @jumormt in https://github.com/SVF-tools/SVF/pull/1385
- add simplify ICFG by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1386
- Converts a mangled name to C naming style to match functions in extapi.c by @shuangxiangkan in https://github.com/SVF-tools/SVF/pull/1393
- fix some non-ret and unused var warning by @jumormt in https://github.com/SVF-tools/SVF/pull/1396
- fix LD_LIBRARY_PATH error in setup.sh by @yaoyue123 in https://github.com/SVF-tools/SVF/pull/1397
- refactor the PR of merging AE and AEAPI by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1395
- refactor: uses()/getUser() -> users() by @jumormt in https://github.com/SVF-tools/SVF/pull/1400
- fix var arg and chgnode not found error by @jumormt in https://github.com/SVF-tools/SVF/pull/1403
- Sync SVF-EX with https://github.com/SVF-tools/Test-Suite by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1404
- first commit of supporting zext and sext by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1398
- update AE library by @jiawei-95 in https://github.com/SVF-tools/SVF/pull/1408
- set name for each value by @jumormt in https://github.com/SVF-tools/SVF/pull/1409
- add x87 double float support, by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1412
- Fix #1370: Establish a copy edge for int2ptr instruction/constantexpr by @yuleisui in https://github.com/SVF-tools/SVF/pull/1410
- Fix llvm assertion in removeFunAnnotations() by @shuangxiangkan in https://github.com/SVF-tools/SVF/pull/1420
- add race checker by @yuleisui in https://github.com/SVF-tools/SVF/pull/1419
- Add llvm-17.0.6 support by @adi
- SVF-2.92024-02-01 · 2024-02-01 10:44 UTC
查看更新说明
This is a stable release of SVF for LLVM-14.0.0 with the following change:
- CMake significant changes
- Supporting opaque pointers in progress
- Performing improvement for Andersen in memory and speed
- Symbolic abstraction implementation in abstract execution.
In our next release, SVF will support LLVM-16 and merge the Abstract Execution solver code.
What's Changed
- opaque pointer stage 2-1 by @jumormt in https://github.com/SVF-tools/SVF/pull/1304
- remove isNonPointerObj API by @yuleisui in https://github.com/SVF-tools/SVF/pull/1315
- Opaque stage 2.2 by @jumormt in https://github.com/SVF-tools/SVF/pull/1317
- Fix numOfElements for a C++ object with vtable by @yuleisui in https://github.com/SVF-tools/SVF/pull/1318
- remove redundant BUF_CHECK from extapi.c by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1320
- Modernise CMake script by @Johanmyst in https://github.com/SVF-tools/SVF/pull/1305
- Let Docker use specific cmake version by @xudon9 in https://github.com/SVF-tools/SVF/pull/1328
- add intervalESBase by @jumormt in https://github.com/SVF-tools/SVF/pull/1333
- turn interprocedural off by @jumormt in https://github.com/SVF-tools/SVF/pull/1334
- add arraySize to AddrStmt by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1324
- fix a name ambiguous in IntervalExeState by @bjjwwang in https://github.com/SVF-tools/SVF/pull/1335
- add symbolic abstraction test by @jiawei-95 in https://github.com/SVF-tools/SVF/pull/1339
- Add Memory Statistics and Clean Solitaries in Constraint Graph by @kisslune in https://github.com/SVF-tools/SVF/pull/1340
- clean up and improve SVF stats by @yuleisui in https://github.com/SVF-tools/SVF/pull/1341
- use template in WTO by @jumormt in https://github.com/SVF-tools/SVF/pull/1342
- Bytesize by @jumormt in https://github.com/SVF-tools/SVF/pull/1344
- cpp stage 1: move cppUtil to svf-llvm by @jumormt in https://github.com/SVF-tools/SVF/pull/1345
- fix svf-npm publish CI: remove previous folder before copying by @jumormt in https://github.com/SVF-tools/SVF/pull/1346
- fix npm publish CI by @jumormt in https://github.com/SVF-tools/SVF/pull/1347
- opaque pointer support (type inference) for c by @jumormt in https://github.com/SVF-tools/SVF/pull/1323
- Rm std::transform by @jumormt in https://github.com/SVF-tools/SVF/pull/1348
- use orderedset to select largest type by @jumormt in https://github.com/SVF-tools/SVF/pull/1351
- Opaque by @jumormt in https://github.com/SVF-tools/SVF/pull/1352
- fix isTemplate and fix a NPD bug by @jumormt in https://github.com/SVF-tools/SVF/pull/1353
Full Changelog: https://github.com/SVF-tools/SVF/compare/SVF-2.8...SVF-2.9
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
SVF provides reusable abstractions, graphs, and solvers for analyzing LLVM IR.
News
- MSli, an on-demand program slicing tool for multithreaded programs, is now available in SVF/MTA.
- SVF now supports LLVM-22 (Contributed by Giorgio).
- SVF now supports LLVM-21 (Contributed by cjsrxzdyzds).
- SVF now supports new build system (Thank Johannes for his help!).
- SVF-Python is now available, enabling developers to write static analyzers in Python by leveraging the SVF library (Contributed by Jiawei Wang).
- New course Software Security Analysis for learning code analysis and verification with SVF for fun and expertise!
- SVF now supports LLVM-16.0.0 with opaque pointers (Contributed by Xiao Cheng).
- Modernize SVF's CMake (Contributed by Johannes).
- SVF now supports LLVM-13.0.0 (Thank Shengjie Xu for his help!).
- Object clustering published in our OOPSLA paper is now available in SVF
- Hash-Consed Points-To Sets published in our SAS paper is now available in SVF
- Learning or teaching Software Analysis? Check out SVF-Teaching!
- SVF now supports LLVM-12.0.0 (Thank Xiyu Yang for her help!).
- VSFS published in our CGO paper is now available in SVF
- TypeClone published in our ECOOP paper is now available in SVF
- SVF now uses a single script for its build. Just type
source ./build.shin your terminal, that's it! - SVF now supports LLVM-10.0.0!
- We thank bsauce for writing a user manual of SVF (link1 and link2) in Chinese
- SVF now supports LLVM-9.0.0 (Thank Byoungyoung Lee for his help!).
- SVF now supports a set of field-sensitive pointer analyses.
- Use SVF as an external lib for your own project (Contributed by Hongxu Chen).
- SVF now supports LLVM-7.0.0.
- SVF now supports Docker. Try SVF in Docker!
- SVF now supports LLVM-6.0.0 (Contributed by Jack Anthony).
- SVF now supports LLVM-4.0.0 (Contributed by Jared Carlson. Thank Jared and Will for their in-depth discussions about updating SVF!)
- SVF now supports analysis for C++ programs.
Documentation
| About SVF | Setup Guide | User Guide | Developer Guide |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
| Introducing SVF -- what it does and how we design it | A step by step setup guide to build SVF | Command-line options to run SVF, get analysis outputs, and test SVF with an example or PTABen | Detailed technical documentation and how to write your own analyses in SVF or use SVF as a lib for your tool, and the course on SVF |
SVF's doxygen document is available here.
Features and Publications
SVF (CC'16) is able to perform
- AE (abstract execution): cross-domain execution (ICSE'24), selective widening (OOPSLA'25), recursion analysis (ECOOP'25), typestate analysis (FSE'24);
- WPA (whole program analysis): field-sensitive (SAS'19), flow-sensitive (CGO'21, OOPSLA'21) analysis;
- DDA (demand-driven analysis): flow-sensitive, context-sensitive points-to analysis (FSE'16, TSE'18);
- MSSA (memory SSA form construction): memory regions, side-effects, SSA form (JSS'18);
- SABER (memory error checking): memory leaks and double-frees (ISSTA'12, TSE'14, ICSE'18);
- MTA (analysis of multithreaded programs): value-flows for multithreaded programs (CGO'16), on-demand program slicing (ISSTA'26);
- CFL (context-free-reachability analysis): standard CFL solver, graph and grammar (OOPSLA'22, PLDI'23);
- SVFIR and MemoryModel (SVFIR): SVFIR, memory abstraction and points-to data structure (SAS'21);
- Graphs: generating a variety of graphs, including call graph, ICFG, class hierarchy graph, constraint graph, value-flow graph for static analyses and code embedding (OOPSLA'20, TOSEM'21)



