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

Avoid calls to mallopt() if ASan is active #9308

Merged
merged 1 commit into from May 30, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions FWCore/Utilities/src/MallocOpts.cc
Expand Up @@ -162,6 +162,7 @@ namespace edm
error_message_.clear();
changed_ = false;

#ifndef __SANITIZE_ADDRESS__
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is address sanitizing a function of the operating system or of how the operating system is configured? Basically I'm asking if this is really a compile time switch or should really be a run time one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compile time + run-time library. The main executable (cmsRun) is statically linked to ASan run-time, which initializes required structures and brings all symbols. At compile time it adds and replaces functions calls with special functions in ASan run-time which do all accounting.

#ifdef M_MMAP_MAX
if(mallopt(M_MMAP_MAX,values_.mmap_max_)<0)
error_message_ += "Could not set M_MMAP_MAX\n";
Expand All @@ -177,6 +178,7 @@ namespace edm
#ifdef M_MMAP_THRESHOLD
if(mallopt(M_MMAP_THRESHOLD,values_.mmap_thr_)<0)
error_message_ += "ERROR: Could not set M_MMAP_THRESHOLD\n";
#endif
#endif
}

Expand Down