On 7 April 2017 at 11:00, Nicolai Hähnle <nhaeh...@gmail.com> wrote: > From: Nicolai Hähnle <nicolai.haeh...@amd.com> > > Enable code sanitizers by adding -fsanitize=$foo flags for the compiler > and linker. > > In addition, this also disables checking for undefined symbols: running > the address sanitizer requires additional symbols which should be provided > by a preloaded libasan.so (preloaded for hooking into malloc & friends > globally), and the undefined symbols check gets tripped up by that. > -- > So the main point here is really fixing the linker errors when building > the video libraries with address sanitizer (the gallium_dri build doesn't > seem to set --no-undefined anyway). If somebody knows a better way of doing > that, I'd be happy to hear about it!
The following comes to mind, although it feels _quite_ nasty: export LD_PRELOAD=libasan.so export CC="gcc -fsanitiser..." export CXX=... configure && make && make install I understand that most people will not like it, so I won't mention it again ;-) Couple of suggestions: - as mentioned by Eric - we want to detect and error out if user requests a sanitizer that is not available. - a big warning is due, since running make check _will_ fail, if the library is not preloaded. Thanks Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev