mesa/scons
Jose Fonseca fa46848e51 scons: Allow building with Address Sanitizer.
libasan is never linked to shared objects (which doesn't go well with
-z,defs).  It must either be linked to the main executable, or (more
practically for OpenGL drivers) be pre-loaded via LD_PRELOAD.

Otherwise works.

I didn't find anything with llvmpipe.  I suspect the fact that the
JIT compiled code isn't instrumented means there are lots of errors it
can't catch.

But for non-JIT drivers, the Address/Leak Sanitizers seem like a faster
alternative to Valgrind.

Usage (Ubuntu 15.10):

   scons asan=1 libgl-xlib
   export LD_LIBRARY_PATH=$PWD/build/linux-x86_64-debug/gallium/targets/libgl-xlib
   LD_PRELOAD=libasan.so.2 any-opengl-application

Acked-by: Roland Scheidegger <sroland@vmware.com>
2016-04-13 06:54:32 +01:00
..
crossmingw.py scons: Search only for mingw-w64 cross-compilers. 2014-06-06 13:15:37 +01:00
custom.py scons: do not include headers from the sources lists 2014-08-14 15:38:04 +01:00
dxsdk.py
fixes.py
gallium.py scons: Allow building with Address Sanitizer. 2016-04-13 06:54:32 +01:00
llvm.py scons: support for LLVM 3.7. 2015-12-08 13:53:31 +00:00
source_list.py
x11.py