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.
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.
See r3931
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/381