Skip to content

stilscher/analyzer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goblint

Build status Docker Build Status Documentation Status

Documentation can be browsed on Read the Docs or GitHub.

Setup

Linux / MacOS

For an up-to-date-version, clone this repository, use make setup to install OCaml and all dependencies, and make to build.

Alternatively: Install opam, and then do opam install goblint. Warning: The OPAM package is updated infrequently.

Run goblint: ./goblint tests/regression/04-mutex/01-simple_rc.c.

If something goes wrong, take a look at travis-ci.sh for an example Ubuntu/macOS setup.

macOS

Goblint relies on GNU cpp to preprocess source files - the default clang cpp on macOS will not work. You can install it with brew install gcc (first do xcode-select --install if you don't want to build from source). You can check src/config.ml to see what command is used to call cpp.

Windows

For Windows, we recommend using WSL.

Docker / Virtual machine

You can run Goblint in a Docker container using: docker run -it voglerr/goblint ./goblint --help.

A virtual machine containing Goblint can be set up using Vagrant: vagrant up && vagrant ssh.

Web frontend

The analysis results are printed to stdout by default. Adding --html saves the results as XML, which is then transformed to be viewable in a web browser. Use make jar to build the needed Java program.

./goblint --html path/to/file.c

Open result/index.xml in a browser of your choice. Depending on the browser security settings, it might be necessary to serve the result directory from a webserver to access it. This can be done by e.g. running python3 -m http.server in the result directory. The results should then be accessible at http://localhost:8000

About

The goblint static analysis framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • OCaml 68.5%
  • C 27.7%
  • Python 1.6%
  • Shell 1.3%
  • Ruby 0.8%
  • Dockerfile 0.1%