Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
totaam opened this issue Jul 16, 2013 · 2 comments
Closed

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

totaam opened this issue Jul 16, 2013 · 2 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Jul 16, 2013

Issue migrated from trac ticket # 381

component: packaging | priority: minor | resolution: fixed

2013-07-16 13:36:58: ahuillet created the issue


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.

@totaam
Copy link
Collaborator Author

totaam commented Jul 20, 2013

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.

@totaam
Copy link
Collaborator Author

totaam commented Aug 10, 2013

2013-08-10 08:54:31: ahuillet commented


See r3931

@totaam totaam closed this as completed Aug 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant