valgrind, gcc 6.2.0 and “-fsanitize=address”

You won’t be able to run sanitized code under Valgrind. Even if you get past the problem with preloading libasan, you’ll run into conflicting address space requirements (i.e. upon start Valgrind reserves region of memory which is also required by Asan shadow memory) and this can’t be worked around as both addresses are hard-coded in Valgrind and libasan. Similar issues exist for Asan and Tsan or Asan and Msan (i.e. they can’t be enabled simultaneously). It’s unlikely to be fixed as sanitizers are highly specialized to achieve their impressive performance numbers.

Leave a Comment