Xpra: Ticket #381: Build with -fsanitize=address for debug builds with GCC >= 4.8

Address sanitizer is a valgrind-like tool with higher performance, that can be enabled (almost) transparently. Build with -fsanitize=address on gcc >= 4.8. It has a ~50% perf impact, but it will bail on the very first memory error, and that's very useful.



Sat, 20 Jul 2013 10:14:56 GMT - Antoine Martin: owner changed; milestone set

It was trivial so r3902 does this.

This is what I get for rencode on Fedora 19:

./setup.py build --with-debug
(..)
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 \
  -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches \
  -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall \
  -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 \
  -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC \
  -I/usr/include/python2.7 -c xpra/net/rencode/rencode.c \
  -o build/temp.linux-x86_64-2.7/xpra/net/rencode/rencode.o \
  -Wall -Werror=implicit-function-declaration -fPIC -g -fsanitize=address -O3

Are there any other flags we may want to turn on? Either when debug is on, or even using a new build flag if needed.

If not, please close this ticket.


Sat, 10 Aug 2013 07:54:31 GMT - ahuillet:

See r3931


Sat, 10 Aug 2013 07:54:40 GMT - ahuillet: status changed; resolution set


Sat, 23 Jan 2021 04:53:40 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/381