croemheld / icarus

A LLVM-based general-purpose static analysis tool.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

icarus

Clang Doxygen Standard License

icarus (Indirect Callsite Analysis and Resolution UtilitieS) is a static analysis tool operating on top of the LLVM IR of a program. Originally designed to perform different types of function pointer analyzes, it has been redesigned into a general purpose analysis tool that is easy to extend for future research projects and experiments to learn more about static analysis in general.

icarus is similar to LLVM's in-house opt tool, except that opt applies code optimization and transformation passes on a per-module basis. This makes it unsuitable to perform different types of analyzes where multiple LLVM IR files need to be analyzed in one single pass. This especially includes the analysis of the Linux kernel and its modules that were the original target of the icarus tool.

Getting started

Prerequisites

icarus was developed on Debian GNU/Linux and requires a small set of freely available binaries for the build to successfully work. The names of the packages may differ on other distributions.

  • clang-* and llvm-*-dev (* >= 4): The static analysis tool operates on the LLVM IR that is generated by the Clang compiler. The LLVM libraries contains all the necessary headers and classes needed to build icarus and its passes.
  • cmake (>= 3.13.0): The minimum version of cmake was determined using the cmake_min_version tool. Depending on the progress and the complexity of the project, the minimum version may change at some point in the future.
  • A generator, such as Ninja (ninja-build) or Makefile (make) to build the icarus executable.

Building

icarus is easily built using cmake and a suitable generator:

git clone https://github.com/croemheld/icarus.git
cd icarus
mkdir build && cd build
cmake -G "Ninja" ..
ninja icarus

Doxygen documentation

An online documentation page generated by Doxygen is available here.

License and third-party components

icarus is licensed under the terms of the MIT license.

The project contains the nlohmann::json single-file header library to parse and construct program states from JSON input, that is also licensed under the MIT license.

The project contains modified classes from the LLVM Compiler Infrastructure which are licensed under the Apache 2.0 License.

The project uses the run-clang-format.py python script licensed under the MIT license for both pre-commit code formatting checks and for the CI pipeline.

Contributions

icarus has been developed since early 2020 and is currently undergoing maintenance. Thus, we do not accept any contributions for the time being.

About

A LLVM-based general-purpose static analysis tool.

License:MIT License


Languages

Language:C++ 95.1%Language:Python 2.8%Language:Shell 1.0%Language:CMake 0.6%Language:Dockerfile 0.3%Language:C 0.2%