-
Notifications
You must be signed in to change notification settings - Fork 2k
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
native: add address sanitizer make target #3327
native: add address sanitizer make target #3327
Conversation
Might be also of interest for @LudwigOrtmann and @BytesGalore to look at. |
@@ -162,7 +166,7 @@ void *calloc(size_t nmemb, size_t size) | |||
} | |||
else { | |||
_native_in_calloc = 1; | |||
*(void **)(&real_calloc) = dlsym(RTLD_NEXT, "calloc"); | |||
/* *(void **)(&real_calloc) = dlsym(RTLD_NEXT, "calloc"); */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain why this is commented out and why it isn't removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You were commenting to fast ;-)
17c64b5
to
6ee2534
Compare
Somehow the debugging symbols are missing for me… can somebody confirm? :/ |
c459363
to
97d4ce5
Compare
Should I also add a target for the thread sanitizer? |
One needs a symbolizer (like |
Ahh there is a fix in GCC 4.9 for that. |
I'll document it in the wiki, as soon as this get's merged. |
IIRC there is a problem with the thread system for 32 bit compiling. Will look at that again. |
You need to install libtsan:i386 probably... |
all-asan: export CFLAGS += -fsanitize=address -fno-omit-frame-pointer -g | ||
all-asan: export CFLAGS += -DNATIVE_IN_CALLOC | ||
all-asan: export LINKFLAGS += -fsanitize=address -fno-omit-frame-pointer -g | ||
all-asan: export CFLAGS += -fsanitize=thread -fno-omit-frame-pointer -g |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you mean all- t san
You're right: there is no i386 support for libtsan in Debian and co. at least. |
Ahja, that was it :-) ! Please squash. Would be nice to hear @LudwigOrtmann commenting this. Otherwise I tend to merge this soon. |
@authmillenon please squash |
0019301
to
8a33a62
Compare
Done. |
@LudwigOrtmann I'll merge this now as it worked for me and Travis. Still it would be nice if you have a quick look at this |
native: add address sanitizer make target
@PeterKietzmann what exactly would you like my comment on? |
I just wanted you to look over this PR, what you obviously did. So I'm fine |
Adds a make target to compile an application with the GCC address sanitizer.