1018981977
libsanitizer/ * All source files: Merge from upstream 285547. * configure.tgt (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): New variable. * configure.ac (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Handle it. * asan/Makefile.am (asan_files): Add new files. * asan/Makefile.in: Regenerate. * ubsan/Makefile.in: Likewise. * lsan/Makefile.in: Likewise. * tsan/Makefile.am (tsan_files): Add new files. * tsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.am (sanitizer_common_files): Add new files. (EXTRA_libsanitizer_common_la_SOURCES): Define. (libsanitizer_common_la_LIBADD): Likewise. (libsanitizer_common_la_DEPENDENCIES): Likewise. * sanitizer_common/Makefile.in: Regenerate. * interception/Makefile.in: Likewise. * libbacktace/Makefile.in: Likewise. * Makefile.in: Likewise. * configure: Likewise. * merge.sh: Handle builtins/assembly.h merging. * builtins/assembly.h: New file. * asan/libtool-version: Bump the libasan SONAME. From-SVN: r241977
58 lines
1.6 KiB
C++
58 lines
1.6 KiB
C++
//===-- sanitizer_mac.h -----------------------------------------*- C++ -*-===//
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file is shared between various sanitizers' runtime libraries and
|
|
// provides definitions for OSX-specific functions.
|
|
//===----------------------------------------------------------------------===//
|
|
#ifndef SANITIZER_MAC_H
|
|
#define SANITIZER_MAC_H
|
|
|
|
#include "sanitizer_common.h"
|
|
#include "sanitizer_platform.h"
|
|
#if SANITIZER_MAC
|
|
#include "sanitizer_posix.h"
|
|
|
|
namespace __sanitizer {
|
|
|
|
enum MacosVersion {
|
|
MACOS_VERSION_UNINITIALIZED = 0,
|
|
MACOS_VERSION_UNKNOWN,
|
|
MACOS_VERSION_LEOPARD,
|
|
MACOS_VERSION_SNOW_LEOPARD,
|
|
MACOS_VERSION_LION,
|
|
MACOS_VERSION_MOUNTAIN_LION,
|
|
MACOS_VERSION_MAVERICKS,
|
|
MACOS_VERSION_YOSEMITE,
|
|
MACOS_VERSION_UNKNOWN_NEWER
|
|
};
|
|
|
|
MacosVersion GetMacosVersion();
|
|
|
|
char **GetEnviron();
|
|
|
|
} // namespace __sanitizer
|
|
|
|
extern "C" {
|
|
static char __crashreporter_info_buff__[__sanitizer::kErrorMessageBufferSize] =
|
|
{};
|
|
static const char *__crashreporter_info__ __attribute__((__used__)) =
|
|
&__crashreporter_info_buff__[0];
|
|
asm(".desc ___crashreporter_info__, 0x10");
|
|
} // extern "C"
|
|
|
|
namespace __sanitizer {
|
|
static BlockingMutex crashreporter_info_mutex(LINKER_INITIALIZED);
|
|
|
|
INLINE void CRAppendCrashLogMessage(const char *msg) {
|
|
BlockingMutexLock l(&crashreporter_info_mutex);
|
|
internal_strlcat(__crashreporter_info_buff__, msg,
|
|
sizeof(__crashreporter_info_buff__)); }
|
|
} // namespace __sanitizer
|
|
|
|
#endif // SANITIZER_MAC
|
|
#endif // SANITIZER_MAC_H
|