All Projects → hassansalehe → EmbedSanitizer

hassansalehe / EmbedSanitizer

Licence: other
EmbedSantizer is a runtime race detection tool which extends ThreadSanitizer to detect data races in 32-bit ARM applications.

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to EmbedSanitizer

Dstep
A tool for converting C and Objective-C headers to D modules
Stars: ✭ 177 (+1006.25%)
Mutual labels:  llvm, clang
clangbuilder
Building Clang ♡ Utility and Environment
Stars: ✭ 101 (+531.25%)
Mutual labels:  llvm, clang
Constexpr Everything
Rewrite C++ code to automatically apply `constexpr` where possible
Stars: ✭ 178 (+1012.5%)
Mutual labels:  llvm, clang
Cling
The cling C++ interpreter
Stars: ✭ 2,322 (+14412.5%)
Mutual labels:  llvm, clang
codebrowser
Woboq CodeBrowser
Stars: ✭ 985 (+6056.25%)
Mutual labels:  llvm, clang
Play with llvm
A book about LLVM & Clang(中文开源书:玩转 LLVM)
Stars: ✭ 175 (+993.75%)
Mutual labels:  llvm, clang
Cmake Scripts
A selection of useful scripts for use in CMake projects, include code coverage, sanitizers, and dependency graph generation.
Stars: ✭ 202 (+1162.5%)
Mutual labels:  llvm, clang
Metareflect
Metareflect is a lightweight reflection system for C++, based on LLVM and Clangs libtooling.
Stars: ✭ 125 (+681.25%)
Mutual labels:  llvm, clang
linux
Linux kernel source tree
Stars: ✭ 234 (+1362.5%)
Mutual labels:  llvm, clang
Checkedc
Checked C is an extension to C that lets programmers write C code that is guaranteed by the compiler to be type-safe. The goal is to let people easily make their existing C code type-safe and eliminate entire classes of errors. Checked C does not address use-after-free errors. This repo has a wiki for Checked C, sample code, the specification, a…
Stars: ✭ 2,692 (+16725%)
Mutual labels:  llvm, clang
Clang Llvm Tutorial
clang & llvm examples, e.g. AST Interpreter, Function Pointer Analysis, Value Range Analysis, Data-Flow Analysis, Andersen Pointer Analysis, LLVM Backend...
Stars: ✭ 139 (+768.75%)
Mutual labels:  llvm, clang
TON-Compiler
Clang compiler for Free TON Virtual Machine
Stars: ✭ 56 (+250%)
Mutual labels:  llvm, clang
Gllvm
Whole Program LLVM: wllvm ported to go
Stars: ✭ 126 (+687.5%)
Mutual labels:  llvm, clang
Webassembly Examples
From Simple To Complex. A complete collection of webassembly examples.
Stars: ✭ 177 (+1006.25%)
Mutual labels:  llvm, clang
Proton Clang
Proton Clang toolchains builds in the form of a continuously updating Git repository. Clone with --depth=1.
Stars: ✭ 126 (+687.5%)
Mutual labels:  llvm, clang
Clang Expand
🐉 A clang tool for happy refactoring without source-code gymnastics
Stars: ✭ 182 (+1037.5%)
Mutual labels:  llvm, clang
Bsodsurvivor
This project aims to facilitate debugging a kernel driver in windows by adding support for a code change on the fly without reboot/unload, and more!
Stars: ✭ 122 (+662.5%)
Mutual labels:  llvm, clang
Llvm Utils
LLVM/Clang for Visual Studio 2019, 2017, 2015, 2013, 2012 and 2010. clang-cl for Python3 distutils. Utils for Clang Static Analyzer
Stars: ✭ 123 (+668.75%)
Mutual labels:  llvm, clang
Symbiotic
Symbiotic is a tool for finding bugs in computer programs based on instrumentation, program slicing and KLEE
Stars: ✭ 212 (+1225%)
Mutual labels:  llvm, instrumentation
sbt-instrumentation
Configurable instrumentation of LLVM bitcode
Stars: ✭ 31 (+93.75%)
Mutual labels:  llvm, instrumentation

EmbedSanitizer: A Runtime Race Detection Tool for 32-bit Embedded ARM

Build Status codecov FOSSA Status

This tool extends ThreadSanitizer to do race detection for 32-bit ARM applications. Due to the complexity of the ThreadSanitizer's race detection runtime, EmbedSanitizer implements its own runtime by applying FastTrack (see: link) which is an efficient and precise race detection algorithm relying on happens-before concepts.

Please consult relevant tool paper for further information here.

Usage Summary

EmbedSanitizer can be installed as part of LLVM/Clang infrastructure in a development machine; presumably an x86_64 platform. Then it can be launched in similar manner to ThreadSanitizer; using a compiler flag -fsanitize=thread. Once the compiler produces your program's final executable with EmbedSanitizer instrumentation, you can run on a target ARM 32-bit platform.

# Use the installed EmbedSanitizer in your development machine as part of Clang compiler
# to build your 32-bit ARM applications.
>$ ./clang++ my_program.cpp -o my_program.exe -fsanitize=thread -static <other_compiler_flags>

>$ file my_program.exe # this shows the type of the produced binary.
my_program.exe: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0

Then take your executable to a target platform and run it there.

>$  ./my_program.exe # running on a target hardware

Then races will be reported, if any, when the program runs. Alternatively, you can use QEMU emulator in your development machine to run your program but it may be very slow.

>$ qemu-arm ./my _program.exe

Building and Installation

(a) Prerequisites

This tool has been tested on x86_64 machine with Ubuntu 16.04. Moreover, make sure that the following are installed in your platform.

>$ apt-get install -y gcc-multilib g++-multilib
>$ apt-get install -y libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi
>$ apt-get install -y libncurses5-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi

(b) Installation

To build and install, there is Bash script install.sh at the main directory of the project.

>$  ./install.sh

Running

(a) Compiling your program

The install.sh script builds LLVM/Clang with EmbedSanitizer in it and installs it in arm directory. Then you can compile your program from the main directory of the project using the command format below:

>$  ./arm/bin/clang++ -o <executable_name> <your_program_name.cpp> -fsanitize=thread

The compiler produces an ARM-compatible executable.

Note:

Sometimes your program may not compile due to 'missing' library headers like iostream, cstdlib and bits/config.h. Therefore, you need to add appropriate include paths as in the example below.

>$  ./arm/bin/clang++ -o <executable_name> <your_program_name.cpp> -fsanitize=thread -I$(shell find /usr/arm-linux-gnueabi -name iostream | sed 's/\/iostream//g') -I$(shell find /usr/arm-linux-gnueabi/include -type d -name arm-linux-gnueabi) -I/usr/arm-linux-gnueabi/include

(b) Running your program

Once your program is instrumented and compiled by LLVM/Clang, you can run it in a 32-bit ARM platform. Alternatively, you can launch your program with the Qemu emulator:

>$ qemu-arm <executable_name>

Experimental Results from the Benchmarks

please refer to tests/parsec_benchmarks/README.md for more information on how to run the benchmarks and get results.

License

Our license derives from that of LLVM/Clang project as we use its source codes. For more information, please read the file LICENSE.md.
Moreover, the benchmarks that we used for evaluation in tests/parsec_benchmarks have their own license from the PARSEC Benchmark suite.

FOSSA Status

Contact

For any inquiries, suggestions or collaborations please contact hassansalehe<at>gmail.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].