diff options
author | Kostya Serebryany <kcc@google.com> | 2016-05-27 21:23:05 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2016-05-27 21:23:05 +0000 |
commit | f4e2d7d1d4a64b8e374fde6e87047347831adf13 (patch) | |
tree | c94e64361a75866068cf2587aec6580cd8237f55 /lib/sanitizer_common/sanitizer_common.cc | |
parent | 6e2868a6ca252fd9fcf4cf1fab76dc5cc8b9258e (diff) |
[sanitizers] introduce __sanitizer_set_report_fd so that we can re-route the sanitizer logging to another fd from inside the process
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_common.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_common.cc b/lib/sanitizer_common/sanitizer_common.cc index fda143e63..e8e75dca8 100644 --- a/lib/sanitizer_common/sanitizer_common.cc +++ b/lib/sanitizer_common/sanitizer_common.cc @@ -496,6 +496,11 @@ void __sanitizer_set_report_path(const char *path) { report_file.SetReportPath(path); } +void __sanitizer_set_report_fd(void *fd) { + report_file.fd = reinterpret_cast<uptr>(fd); + report_file.fd_pid = internal_getpid(); +} + void __sanitizer_report_error_summary(const char *error_summary) { Printf("%s\n", error_summary); } |