Skip to content

rukkal/libcxx-msan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

libcxx-msan

  • A bash script to build the LLVM libc++ with memory sanitizer instrumentation
  • A bash script to be sourced in order to use the instrumented libc++

How to use it

  1. build the instrumented libc++:
export CC=clang
export CXX=clang++
./build.sh

feel free to change CC and CXX with you favorite clang version

  • load the environment to make clang use the instrumented libc++:
source load-environment

Now you are ready to go. You can compile your program using the memory sanitizer. E.g.

$CXX -stdlib=libc++ -fsanitize=memory test.cpp -o test

Important: don't forget to pass -stdlib=libc++. Otherwise clang might use the GNU libstdc++ (default on Linux).

About

A simple script to build libc++ with memory sanitizer instrumentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages