Giter Site home page Giter Site logo

canliture / stack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xiw/stack

0.0 0.0 0.0 1.31 MB

A static checker for identifying unstable code.

Home Page: http://css.csail.mit.edu/stack/

License: Other

Shell 0.77% Ruby 0.40% C++ 54.38% Python 42.94% C 1.52%

stack's Introduction

See INSTALL for build instructions.  Make sure STACK binaries are
in the PATH.


Preparation
-----------

STACK works on LLVM bitcode.  To analyze a software project, the
first step is to generate LLVM bitcode.  STACK provides a script
called `stack-build`, which both calls gcc (or g++) and in parallel
uses Clang to obtain LLVM bitcode from your source code, stored in
.ll files.  For example:

	$ cd /path/to/your/project
	$ stack-build ./configure
	$ stack-build make

or if analyzing a project that is configured using CMake:

	$ cd /path/to/your/project
	$ stack-build cmake
	$ stack-build make


Unstable code checker
---------------------

To find unstable code that can be eliminated due to undefined behavior,
simply run the following command in the project directory after building
LLVM bitcode:

	$ poptck

You can find bug reports in `pstack.txt`, in the YAML format.

Here's one example:

	bug: anti-simplify
	model: |
	  %tobool = icmp ne i8* %p, null, !dbg !14
	  -->  true
	stack: 
	  - p.c:4:0
	ncore: 1
	core: 
	  - p.c:3:0
	    - null pointer dereference

This means the null pointer check at line 4 ("stack:") may be simplified
into true ("model:") due to the pointer dereference at line 3 ("core:").


Contact
-------

If you find any bugs in STACK, feel free to contact us: you can send
us email at [email protected].

stack's People

Contributors

xiw avatar zeldovich avatar haogang avatar rianhunter avatar digitall avatar hfiguiere avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.