Skip to content

Stanback/asan-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Address-Sanitizer Demo Project (Still In Progress)

This a quick example for how to use the address sanitizer to discover various programming errors in C and C++.

How is memory allocated?

What is a memory leak?

Comparison against Valgrind

https://code.google.com/p/address-sanitizer/wiki/ComparisonOfMemoryTools http://btorpey.github.io/blog/2014/03/27/using-clangs-address-sanitizer/

Building on OSX

On OSX, address-sanitizer currently requires a custom build of clang:

Experimenting with the test project

This project includes a CMakeLists.txt file that should let you get started. Steps:

git clone https://github.com/Stanback/asan-demo.git
mkdir build
cmake ../asan-demo
make
./leak-demo

About

Address-sanitizer information and demos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages