#include "tsan_rtl.h"
#include "sanitizer_common/sanitizer_ptrauth.h"
#if !SANITIZER_GO
# include "tsan_interceptors.h"
#endif
namespace __tsan {
#define CALLERPC …
struct TagData { … };
static TagData registered_tags[kExternalTagMax] = …;
static atomic_uint32_t used_tags{ … };
static TagData *GetTagData(uptr tag) { … }
const char *GetObjectTypeFromTag(uptr tag) { … }
const char *GetReportHeaderFromTag(uptr tag) { … }
uptr TagFromShadowStackFrame(uptr pc) { … }
#if !SANITIZER_GO
static void PushTag(ThreadState *thr, uptr tag) { … }
static void PopTag(ThreadState *thr) { … }
static void ExternalAccess(void *addr, uptr caller_pc, uptr tsan_caller_pc,
void *tag, AccessType typ) { … }
extern "C" {
SANITIZER_INTERFACE_ATTRIBUTE
void *__tsan_external_register_tag(const char *object_type) { … }
SANITIZER_INTERFACE_ATTRIBUTE
void __tsan_external_register_header(void *tag, const char *header) { … }
SANITIZER_INTERFACE_ATTRIBUTE
void __tsan_external_assign_tag(void *addr, void *tag) { … }
SANITIZER_INTERFACE_ATTRIBUTE
void __tsan_external_read(void *addr, void *caller_pc, void *tag) { … }
SANITIZER_INTERFACE_ATTRIBUTE
void __tsan_external_write(void *addr, void *caller_pc, void *tag) { … }
}
#endif
}