llvm/compiler-rt/lib/lsan/lsan_posix.cpp

//=-- lsan_posix.cpp -----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//
//
// This file is a part of LeakSanitizer.
// Standalone LSan RTL code common to POSIX-like systems.
//
//===---------------------------------------------------------------------===//

#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() {}

}  // namespace __lsan

#endif  // SANITIZER_POSIX