Giter VIP home page Giter VIP logo

code_mutation_tool's Introduction

Overview

This is a fault injection tool built on the top of Clang/LLVM for C/C++ programs. It performs code mutations by scanning the IR codes generated from source codes, parsing the AST of IR codes, and generating faulty versions of source codes.

Requirements:

Clang/LLVM 13.0.0

cmake 3.18.2

GCC 4.8.5

Copy the source codes to clang/llvm project, for example:

cp -R path_of_code_mutation_tool/* /root/llvm-project-llvmorg-13.0.0/clang/tools

Then compile or re-compile the Clang/LLVM project, the built tools can be found in /root/llvm-project-llvmorg-13.0.0/build/bin.

Usage example:

This program (omfc) injects MFC fault by editing program at AST level and write out the changed source code.

inFile: path of the target C/C++ sorce code file

outDir: output directory for mutated codes

fListFile: path of target function list file (each line one function)

omfc <inFile> -d <outDir> [-f <fListFile>] --

other fault injectors:

omia <inFile> -d <outDir> [-f <fListFile>] --
omieb <inFile> -d <outDir> [-f <fListFile>] --
omifs <inFile> -d <outDir> [-f <fListFile>] --
omlc <inFile> -d <outDir> [-f <fListFile>] --
omlpa <inFile> -d <outDir> [-f <fListFile>] --
omvae <inFile> -d <outDir> [-f <fListFile>] --
omvav <inFile> -d <outDir> [-f <fListFile>] --
omviv <inFile> -d <outDir> [-f <fListFile>] --
omaep <inFile> -d <outDir> [-f <fListFile>] --
owpfv <inFile> -d <outDir> [-f <fListFile>] --
owvav <inFile> -d <outDir> [-f <fListFile>] --

code_mutation_tool's People

Contributors

yuexiarenjing avatar

Watchers

 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.