Skip to content

LLVM pass that adds assertions to check for undefined behavior

Notifications You must be signed in to change notification settings

campkeith/auto-assert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

auto-assert

LLVM pass that adds assertions to check for undefined behavior

  • getelementptr, load, store null pointer check
  • getelementptr bounds checking
  • add, sub, mul, shl unsigned/signed wrap checking
  • udiv, sdiv, lshr, ashr exact result check
  • shl, ashr, lshr shift bounds checking
  • sdiv, srem overflow
  • udiv, urem, sdiv, srem divide by zero

Usage

Place in the tools directory of an LLVM source tree to compile the passes.

Run with:

opt -load <path-to-"autoassert.so"> -auto-assert

Then link with an assertion function implementation:

llvm-link <input-llvm-ir> <path-to-"libassert.ll">

About

LLVM pass that adds assertions to check for undefined behavior

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages