[cfe-dev] About Address San...

Alexander Potapenko glider at google.com
Fri May 25 05:11:28 PDT 2012

Hi Umesh,

> We are trying to instrument  our code with ASan(Clang) to find the memory
> errors and we see that the application execution halts  when the Asan check
> finds the memory issue at the being. Which mean we need to fix the issue
> then compile and  execute the instrumented code again to find the next issue
> and so on .Which is fine.
> We would  like to know that there is any option to clang or llvm ,Where we
> can say to Asan to log  output to the file and continue to execute the
> instrumented application instead of halting the same.Like Valgrind memcheck
> has.So we can whole or almost issues  in the log .

This is not currently supported.
Once you've read the data from a wild pointer you may get into trouble
if any sensitive code is using it.
Wild writes are even more dangerous, because they may corrupt the
stack, the heap or other data structures.
Because it is generally hard to recover from such situations, ASan
just terminates the program.

You can try to instrument only the writes (pass "-mllvm
-asan-instrument-reads=false" to the compiler) to skip the less
interesting error reports, but you can't print all of them at once.


More information about the cfe-dev mailing list