[sanitizer] Move StartReportDeadlySignal into sanitizer_common_libcdep

llvm-svn: 313518
This commit is contained in:
Vitaly Buka 2017-09-18 07:36:32 +00:00
parent 86dd088f4d
commit 7119b57a9d
3 changed files with 8 additions and 12 deletions

View File

@ -148,6 +148,14 @@ void BackgroundThread(void *arg) {
#endif
#if !SANITIZER_GO
void StartReportDeadlySignal() {
// Write the first message using fd=2, just in case.
// It may actually fail to write in case stderr is closed.
CatastrophicErrorWrite(SanitizerToolName, internal_strlen(SanitizerToolName));
static const char kDeadlySignal[] = ":DEADLYSIGNAL\n";
CatastrophicErrorWrite(kDeadlySignal, sizeof(kDeadlySignal) - 1);
}
static void MaybeReportNonExecRegion(uptr pc) {
#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
MemoryMappingLayout proc_maps(/*cache_enabled*/ true);

View File

@ -261,14 +261,6 @@ bool SignalContext::IsStackOverflow() const {
(si->si_code == si_SEGV_MAPERR || si->si_code == si_SEGV_ACCERR);
}
void StartReportDeadlySignal() {
// Write the first message using fd=2, just in case.
// It may actually fail to write in case stderr is closed.
internal_write(2, SanitizerToolName, internal_strlen(SanitizerToolName));
static const char kDeadlySignal[] = ":DEADLYSIGNAL\n";
internal_write(2, kDeadlySignal, sizeof(kDeadlySignal) - 1);
}
#endif // SANITIZER_GO
bool IsAccessibleMemoryRange(uptr beg, uptr size) {

View File

@ -858,10 +858,6 @@ void InstallDeadlySignalHandlers(SignalHandlerType handler) {
// FIXME: Decide what to do on Windows.
}
void StartReportDeadlySignal() {
// FIXME: Decide what to do on Windows.
}
HandleSignalMode GetHandleSignalMode(int signum) {
// FIXME: Decide what to do on Windows.
return kHandleSignalNo;