[compiler-rt] r182765 - [nolibc] Make SymbolizerPrepareForSandboxing weak and optional.
Peter Collingbourne
peter at pcc.me.uk
Tue May 28 04:05:05 PDT 2013
Author: pcc
Date: Tue May 28 06:05:05 2013
New Revision: 182765
URL: http://llvm.org/viewvc/llvm-project?rev=182765&view=rev
Log:
[nolibc] Make SymbolizerPrepareForSandboxing weak and optional.
Differential Revision: http://llvm-reviews.chandlerc.com/D872
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=182765&r1=182764&r2=182765&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Tue May 28 06:05:05 2013
@@ -307,7 +307,8 @@ void PrepareForSandboxing() {
// cached mappings.
MemoryMappingLayout::CacheMemoryMappings();
// Same for /proc/self/exe in the symbolizer.
- SymbolizerPrepareForSandboxing();
+ if (&SymbolizerPrepareForSandboxing)
+ SymbolizerPrepareForSandboxing();
}
// ----------------- sanitizer_procmaps.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.h?rev=182765&r1=182764&r2=182765&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.h Tue May 28 06:05:05 2013
@@ -114,7 +114,7 @@ typedef bool (*string_predicate_t)(const
uptr GetListOfModules(LoadedModule *modules, uptr max_modules,
string_predicate_t filter);
-void SymbolizerPrepareForSandboxing();
+void SymbolizerPrepareForSandboxing() SANITIZER_WEAK_ATTRIBUTE;
} // namespace __sanitizer
More information about the llvm-commits
mailing list