diff options
| author | Kostya Kortchinsky <kostyak@google.com> | 2018-04-03 18:07:22 +0000 |
|---|---|---|
| committer | Kostya Kortchinsky <kostyak@google.com> | 2018-04-03 18:07:22 +0000 |
| commit | 2c5f94401565807a77f914875adeb9db7473ee73 (patch) | |
| tree | ff4b7684232fe10b297dcdee62d3f778e92efd68 /compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc | |
| parent | 4fad76ccdec605bb0f272e8d5a9d51276d3eed2c (diff) | |
| download | bcm5719-llvm-2c5f94401565807a77f914875adeb9db7473ee73.tar.gz bcm5719-llvm-2c5f94401565807a77f914875adeb9db7473ee73.zip | |
[sanitizer] Remove empty Symbolizer PrepareForSandboxing
Summary:
`Symbolizer::PrepareForSandboxing` is empty for all platforms and apparently
has been for a while (D10213). Remove it, and shuffle things around so that the
platform specific code is now in `PlatformPrepareForSandboxing`.
This allows to have one less symbolizer dependency in a common file, which
helps for the upcoming split.
Also remove `SymbolizerPrepareForSandboxing` in tsan_go which appears to not
be used anywhere.
Reviewers: alekseyshl, eugenis, dvyukov, mcgrathr
Reviewed By: alekseyshl
Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D44953
llvm-svn: 329094
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc index 224f6b19c44..9c24c30749c 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc @@ -59,11 +59,6 @@ bool ColorizeReports() { (internal_strcmp(flag, "auto") == 0 && ReportSupportsColors()); } -static void (*sandboxing_callback)(); -void SetSandboxingCallback(void (*f)()) { - sandboxing_callback = f; -} - void ReportErrorSummary(const char *error_type, const StackTrace *stack, const char *alt_tool_name) { #if !SANITIZER_GO @@ -369,11 +364,16 @@ void ScopedErrorReportLock::CheckLocked() { CommonSanitizerReportMutex.CheckLocked(); } +static void (*sandboxing_callback)(); +void SetSandboxingCallback(void (*f)()) { + sandboxing_callback = f; +} + } // namespace __sanitizer SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_sandbox_on_notify, __sanitizer_sandbox_arguments *args) { - __sanitizer::PrepareForSandboxing(args); + __sanitizer::PlatformPrepareForSandboxing(args); if (__sanitizer::sandboxing_callback) __sanitizer::sandboxing_callback(); } |

