#include "sanitizer_common/sanitizer_platform.h"
#if SANITIZER_POSIX
# include <pthread.h>
# include "lsan.h"
# include "lsan_allocator.h"
# include "lsan_thread.h"
# include "sanitizer_common/sanitizer_stacktrace.h"
# include "sanitizer_common/sanitizer_tls_get_addr.h"
namespace __lsan {
ThreadContext::ThreadContext(int tid) : … { … }
struct OnStartedArgs { … };
void ThreadContext::OnStarted(void *arg) { … }
void ThreadStart(u32 tid, tid_t os_id, ThreadType thread_type) { … }
bool GetThreadRangesLocked(tid_t os_id, uptr *stack_begin, uptr *stack_end,
uptr *tls_begin, uptr *tls_end, uptr *cache_begin,
uptr *cache_end, DTLS **dtls) { … }
void InitializeMainThread() { … }
static void OnStackUnwind(const SignalContext &sig, const void *,
BufferedStackTrace *stack) { … }
void LsanOnDeadlySignal(int signo, void *siginfo, void *context) { … }
void InstallAtExitCheckLeaks() { … }
static void BeforeFork() { … }
static void AfterFork(bool fork_child) { … }
void InstallAtForkHandler() { … }
}
#endif