Skip to content

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org.

Notifications You must be signed in to change notification settings

ykdu/llvm-project

 
 

Repository files navigation

Orion静态分析工具

安装

mkdir build
cd build
cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER=gcc -D CMAKE_CXX_COMPILER=g++ -G "Unix Makefiles" ../llvm
make clang -j30
make install clang -j30

检测项 & 检测方法

单个编译单元检测项 含义 检测方法
Missing __rpc__ 缺少_rpc_ 某路径中,在遇到__rpc__前先遇到了其他RPC APIs
Missing __end__ 缺少_end_ 函数的分析出口处,某路径依然没有遇到_end_
Nested RPC 嵌套的RPC块 进入__rpc__后,退出__end__前遇到了__rpc__
Unexpected rpc_send_X_length 不应出现send_X_length 见代码注释,DFA
Missing rpc_send_X_length 缺少了send_X_len 用一个dict记录出现过的send_X_length,每次遇到send_X都在dict中对该表项的value减1
跨编译单元检测项 含义 检测方法
Undefined RPC, not found in server client中有而server中没有该RPC
Unique client path, has no corresponding path in server server中该路径在client中没有对应的路径
Unique server path, has no corresponding path in client client中该路径在server中没有对应的路径

使用Orion静态分析工具发现问题

开发人员手册

About

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 44.8%
  • LLVM 30.3%
  • C 10.7%
  • Assembly 9.9%
  • Python 1.4%
  • Objective-C 0.7%
  • Other 2.2%