-
Notifications
You must be signed in to change notification settings - Fork 304
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
DAOS-15799 build: Add libsanitize #14485
Conversation
Bug-tracker data: |
49ff437
to
d38afa0
Compare
Add libsanitize for debugging stack smashing occuring on LRZ servers. WARNIN: When libasan is activated the dlopen is not working properly, and the path of the libraries have to be explicitly defined. More details on tis can be found at https://sourceware.org/bugzilla/show_bug.cgi?id=25114 Skip-test: true Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
58ff43d
to
855d80e
Compare
Version with protected stack and address sanitizer. Skip-test: true Required-githooks: true Signed-off-by: Cedric Koch-Hofer <[email protected]>
opts.Add(BoolVariable('STACK_MMAP', 'Allocate ABT ULTs stacks with mmap()', 0)) | ||
opts.Add(BoolVariable('STACK_MMAP', 'Allocate ABT ULTs stacks with mmap()', 1)) | ||
opts.Add(BoolVariable('ADDRESS_SANITIZER', | ||
'Instrument C code with the Address Sanitizer library', 1)) |
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.
Would SANITIZER=<address|thread|...>
be more economical? Or, even COMPILER_FEAT=<asan|tsan|...>
, but I'm not sure if that's going too far.
print('Enabling Address Sanitizer') | ||
# Enable Address Sanitizer, a fast memory error detector. | ||
env.Prepend(LINKFLAGS=['-fsanitize=address']) | ||
env.Prepend(CCFLAGS=['-fsanitize=address']) |
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.
Also '-fno-omit-frame-pointer'
in CCFLAGS
for better reports.
I found that I had to change -Wframe-larger-than=4096
to a larger value (8192 worked for me), due to the redzones added by asan.
WARNING: This PR is not intended to be merged, but just to build rpms allowing to debug stack bumping issue of the ticket DAOS-15799.
Description
Add libsanitize for debugging stack smashing occuring on LRZ servers.
Skip-test: true
Required-githooks: true
Before requesting gatekeeper:
Features:
(orTest-tag*
) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.Gatekeeper: