/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_rtl.h | 114 ThreadState *thr; // currently wired thread, or nullptr 143 ThreadState *thr; 159 struct alignas(SANITIZER_CACHE_LINE_SIZE) ThreadState { struct 174 ThreadState* current; argument 236 explicit ThreadState(Tid tid); argument 241 ThreadState *cur_thread(); 242 void set_cur_thread(ThreadState *thr); 244 inline ThreadState *cur_thread_init() { return cur_thread(); } in cur_thread_init() 248 inline ThreadState *cur_thread() { in cur_thread() 249 return reinterpret_cast<ThreadState *>(cur_thread_placeholder)->current; in cur_thread() [all …]
|
H A D | tsan_fd.h | 41 void FdAcquire(ThreadState *thr, uptr pc, int fd); 42 void FdRelease(ThreadState *thr, uptr pc, int fd); 43 void FdAccess(ThreadState *thr, uptr pc, int fd); 44 void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true); 45 void FdFileCreate(ThreadState *thr, uptr pc, int fd); 46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write); 47 void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd); 48 void FdEventCreate(ThreadState *thr, uptr pc, int fd); 49 void FdSignalCreate(ThreadState *thr, uptr pc, int fd); 50 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd); [all …]
|
H A D | tsan_platform_mac.cpp | 50 ThreadState)]; 51 static ThreadState *dead_thread_state; 77 auto dts = (ThreadState *)MmapOrDie(sizeof(ThreadState), "ThreadState"); in InitializeThreadStateStorage() 82 res = internal_mprotect(dts, sizeof(ThreadState), PROT_READ); // immutable in InitializeThreadStateStorage() 87 ThreadState *cur_thread() { in cur_thread() 91 return (ThreadState *)main_thread_state; in cur_thread() 96 ThreadState *thr = (ThreadState *)pthread_getspecific(thread_state_key); in cur_thread() 98 thr = (ThreadState *)MmapOrDie(sizeof(ThreadState), "ThreadState"); in cur_thread() 105 void set_cur_thread(ThreadState *thr) { in set_cur_thread() 111 ThreadState *thr = (ThreadState *)pthread_getspecific(thread_state_key); in cur_thread_finalize() [all …]
|
H A D | tsan_rtl_thread.cpp | 74 static void ThreadCheckIgnore(ThreadState *thr) { in ThreadCheckIgnore() 83 static void ThreadCheckIgnore(ThreadState *thr) {} in ThreadCheckIgnore() 86 void ThreadFinalize(ThreadState *thr) { in ThreadFinalize() 104 int ThreadCount(ThreadState *thr) { in ThreadCount() 116 Tid ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached) { in ThreadCreate() 145 ThreadState *thr; 152 void ThreadStart(ThreadState *thr, Tid tid, tid_t os_id, in ThreadStart() 208 thr = new (arg) ThreadState(tid); in OnStarted() 214 void ThreadFinish(ThreadState *thr) { in ThreadFinish() 250 thr->~ThreadState(); in ThreadFinish() [all …]
|
H A D | tsan_mman.h | 33 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz, 36 void user_free(ThreadState *thr, uptr pc, void *p, bool signal = true); 38 void *user_alloc(ThreadState *thr, uptr pc, uptr sz); 39 void *user_calloc(ThreadState *thr, uptr pc, uptr sz, uptr n); 40 void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz); 41 void *user_reallocarray(ThreadState *thr, uptr pc, void *p, uptr sz, uptr n); 42 void *user_memalign(ThreadState *thr, uptr pc, uptr align, uptr sz); 43 int user_posix_memalign(ThreadState *thr, uptr pc, void **memptr, uptr align, 45 void *user_aligned_alloc(ThreadState *thr, uptr pc, uptr align, uptr sz); 46 void *user_valloc(ThreadState *thr, uptr pc, uptr sz); [all …]
|
H A D | tsan_fd.cpp | 56 static FdSync *allocsync(ThreadState *thr, uptr pc) { in allocsync() 69 static void unref(ThreadState *thr, uptr pc, FdSync *s) { in unref() 80 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc() 101 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, in init() 145 void FdOnFork(ThreadState *thr, uptr pc) { in FdOnFork() 178 void FdAcquire(ThreadState *thr, uptr pc, int fd) { in FdAcquire() 189 void FdRelease(ThreadState *thr, uptr pc, int fd) { in FdRelease() 202 void FdAccess(ThreadState *thr, uptr pc, int fd) { in FdAccess() 210 void FdClose(ThreadState *thr, uptr pc, int fd, bool write) { in FdClose() 253 void FdFileCreate(ThreadState *thr, uptr pc, int fd) { in FdFileCreate() [all …]
|
H A D | tsan_mman.cpp | 90 ThreadState *thr = cur_thread(); in ScopedGlobalProcessor() 113 ThreadState *thr = cur_thread(); in ~ScopedGlobalProcessor() 177 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall() 192 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz, uptr align, in user_alloc_internal() 224 void user_free(ThreadState *thr, uptr pc, void *p, bool signal) { in user_free() 233 void *user_alloc(ThreadState *thr, uptr pc, uptr sz) { in user_alloc() 237 void *user_calloc(ThreadState *thr, uptr pc, uptr size, uptr n) { in user_calloc() 250 void *user_reallocarray(ThreadState *thr, uptr pc, void *p, uptr size, uptr n) { in user_reallocarray() 260 void OnUserAlloc(ThreadState *thr, uptr pc, uptr p, uptr sz, bool write) { in OnUserAlloc() 278 void OnUserFree(ThreadState *thr, uptr pc, uptr p, bool write) { in OnUserFree() [all …]
|
H A D | tsan_interface.cpp | 31 ThreadState *thr = cur_thread(); in __tsan_read16_pc() 38 ThreadState *thr = cur_thread(); in __tsan_write16_pc() 47 ThreadState *thr = cur_thread(); in __tsan_unaligned_read16() 54 ThreadState *thr = cur_thread(); in __tsan_unaligned_write16() 72 FiberDestroy(cur_thread(), CALLERPC, static_cast<ThreadState *>(fiber)); in __tsan_destroy_fiber() 77 FiberSwitch(cur_thread(), CALLERPC, static_cast<ThreadState *>(fiber), flags); in __tsan_switch_to_fiber() 82 ThreadSetName(static_cast<ThreadState *>(fiber), name); in __tsan_set_fiber_name()
|
H A D | tsan_rtl_mutex.cpp | 25 void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r); 26 void ReportDestroyLocked(ThreadState *thr, uptr pc, uptr addr, 30 ThreadState *thr; 33 Callback(ThreadState *thr, uptr pc) in Callback() 44 void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s) { in DDMutexInit() 50 static void ReportMutexMisuse(ThreadState *thr, uptr pc, ReportType typ, in ReportMutexMisuse() 68 static void RecordMutexLock(ThreadState *thr, uptr pc, uptr addr, in RecordMutexLock() 80 static void RecordMutexUnlock(ThreadState *thr, uptr addr) { in RecordMutexUnlock() 86 void MutexCreate(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexCreate() 98 void MutexDestroy(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexDestroy() [all …]
|
H A D | tsan_rtl_access.cpp | 18 ALWAYS_INLINE USED bool TryTraceMemoryAccess(ThreadState* thr, uptr pc, in TryTraceMemoryAccess() 57 bool TryTraceMemoryAccessRange(ThreadState* thr, uptr pc, uptr addr, uptr size, in TryTraceMemoryAccessRange() 78 void TraceMemoryAccessRange(ThreadState* thr, uptr pc, uptr addr, uptr size, in TraceMemoryAccessRange() 87 void TraceFunc(ThreadState* thr, uptr pc) { in TraceFunc() 95 NOINLINE void TraceRestartFuncEntry(ThreadState* thr, uptr pc) { in TraceRestartFuncEntry() 100 NOINLINE void TraceRestartFuncExit(ThreadState* thr) { in TraceRestartFuncExit() 105 void TraceMutexLock(ThreadState* thr, EventType type, uptr pc, uptr addr, in TraceMutexLock() 122 void TraceMutexUnlock(ThreadState* thr, uptr addr) { in TraceMutexUnlock() 134 void TraceTime(ThreadState* thr) { in TraceTime() 148 NOINLINE void DoReportRace(ThreadState* thr, RawShadow* shadow_mem, Shadow cur, in DoReportRace() [all …]
|
H A D | tsan_platform_linux.cpp | 568 void ImitateTlsWrite(ThreadState *thr, uptr tls_addr, uptr tls_size) { in ImitateTlsWrite() 605 static ThreadState *dead_thread_state = nullptr; 607 ThreadState *cur_thread() { in cur_thread() 608 ThreadState* thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread() 614 thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr()); in cur_thread() 616 thr = reinterpret_cast<ThreadState*>(MmapOrDie(sizeof(ThreadState), in cur_thread() 620 dead_thread_state = reinterpret_cast<ThreadState*>( in cur_thread() 621 MmapOrDie(sizeof(ThreadState), "ThreadState")); in cur_thread() 626 CHECK_EQ(0, internal_mprotect(dead_thread_state, sizeof(ThreadState), in cur_thread() 635 void set_cur_thread(ThreadState *thr) { in set_cur_thread() [all …]
|
H A D | tsan_rtl.cpp | 52 "initial-exec"))) char cur_thread_placeholder[sizeof(ThreadState)]; 80 static TracePart* TracePartAlloc(ThreadState* thr) { in TracePartAlloc() 233 void DoReset(ThreadState* thr, uptr epoch) SANITIZER_NO_THREAD_SAFETY_ANALYSIS { in DoReset() 252 static TidSlot* FindSlotAndLock(ThreadState* thr) in FindSlotAndLock() 296 void SlotAttachAndLock(ThreadState* thr) { in SlotAttachAndLock() 320 static void SlotDetachImpl(ThreadState* thr, bool exiting) { in SlotDetachImpl() 352 void SlotDetach(ThreadState* thr) { in SlotDetach() 357 void SlotLock(ThreadState* thr) SANITIZER_NO_THREAD_SAFETY_ANALYSIS { in SlotLock() 377 void SlotUnlock(ThreadState* thr) { in SlotUnlock() 407 ThreadState::ThreadState(Tid tid) in ThreadState() function in __tsan::ThreadState [all …]
|
H A D | tsan_interceptors.h | 11 ScopedInterceptor(ThreadState *thr, const char *fname, uptr pc); 23 ThreadState *const thr_; 33 ThreadState *thr; 45 inline bool MustIgnoreInterceptor(ThreadState *thr) { in MustIgnoreInterceptor() 52 ThreadState *thr = cur_thread_init(); \
|
H A D | tsan_interface_atomic.cpp | 224 static T AtomicLoad(ThreadState *thr, uptr pc, const volatile T *a, morder mo) { in AtomicLoad() 262 static void AtomicStore(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicStore() 285 static T AtomicRMW(ThreadState *thr, uptr pc, volatile T *a, T v, morder mo) { in AtomicRMW() 342 static T AtomicExchange(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicExchange() 348 static T AtomicFetchAdd(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicFetchAdd() 354 static T AtomicFetchSub(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicFetchSub() 360 static T AtomicFetchAnd(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicFetchAnd() 366 static T AtomicFetchOr(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicFetchOr() 372 static T AtomicFetchXor(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicFetchXor() 378 static T AtomicFetchNand(ThreadState *th [all...] |
H A D | tsan_sync.h | 67 void Init(ThreadState *thr, uptr pc, uptr addr, bool save_stack); 97 void AllocBlock(ThreadState *thr, uptr pc, uptr p, uptr sz); 114 SyncVar *GetSyncOrCreate(ThreadState *thr, uptr pc, uptr addr, in GetSyncOrCreate() 142 SyncVar *GetSync(ThreadState *thr, uptr pc, uptr addr, bool create,
|
H A D | tsan_interface.h | 230 struct ThreadState; 410 void __tsan_go_atomic32_load(ThreadState *thr, uptr cpc, uptr pc, u8 *a); 412 void __tsan_go_atomic64_load(ThreadState *thr, uptr cpc, uptr pc, u8 *a); 414 void __tsan_go_atomic32_store(ThreadState *thr, uptr cpc, uptr pc, u8 *a); 416 void __tsan_go_atomic64_store(ThreadState *thr, uptr cpc, uptr pc, u8 *a); 418 void __tsan_go_atomic32_fetch_add(ThreadState *thr, uptr cpc, uptr pc, u8 *a); 420 void __tsan_go_atomic64_fetch_add(ThreadState *thr, uptr cpc, uptr pc, u8 *a); 422 void __tsan_go_atomic32_fetch_and(ThreadState *thr, uptr cpc, uptr pc, u8 *a); 424 void __tsan_go_atomic64_fetch_and(ThreadState *thr, uptr cpc, uptr pc, u8 *a); 426 void __tsan_go_atomic32_fetch_or(ThreadState *th [all...] |
H A D | tsan_interceptors_posix.cpp | 182 void EnterBlockingFunc(ThreadState *thr) { in EnterBlockingFunc() 257 static ThreadSignalContext *SigCtx(ThreadState *thr) { in SigCtx() 275 ScopedInterceptor::ScopedInterceptor(ThreadState *thr, const char *fname, in ScopedInterceptor() 364 explicit BlockingCall(ThreadState *thr) in BlockingCall() 380 ThreadState *thr; 424 ThreadState *thr = cur_thread(); in at_exit_callback_installed_at() 433 ThreadState *thr = cur_thread(); in cxa_at_exit_callback_installed_at() 442 static int setup_at_exit_wrapper(ThreadState *thr, uptr pc, void(*f)(), 463 static int setup_at_exit_wrapper(ThreadState *thr, uptr pc, void(*f)(), in setup_at_exit_wrapper() 499 ThreadState *thr = cur_thread(); in on_exit_callback_installed_at() [all …]
|
H A D | tsan_external.cpp | 62 static void PushTag(ThreadState *thr, uptr tag) { in PushTag() 65 static void PopTag(ThreadState *thr) { FuncExit(thr); } in PopTag() 74 ThreadState *thr = cur_thread(); in ExternalAccess()
|
H A D | tsan_rtl_proc.cpp | 45 void ProcWire(Processor *proc, ThreadState *thr) { in ProcWire() 52 void ProcUnwire(Processor *proc, ThreadState *thr) { in ProcUnwire()
|
H A D | tsan_sync.cpp | 19 void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s); 23 void SyncVar::Init(ThreadState *thr, uptr pc, uptr addr, bool save_stack) { in Init() 47 void MetaMap::AllocBlock(ThreadState *thr, uptr pc, uptr p, uptr sz) { in AllocBlock() 204 SyncVar *MetaMap::GetSync(ThreadState *thr, uptr pc, uptr addr, bool create, in GetSync()
|
H A D | tsan_symbolize.cpp | 25 ThreadState *thr = cur_thread(); in EnterSymbolizer() 32 ThreadState *thr = cur_thread(); in ExitSymbolizer()
|
H A D | tsan_interface_ann.cpp | 32 ScopedAnnotation(ThreadState *thr, const char *aname, uptr pc) in ScopedAnnotation() 43 ThreadState *const thr_; 49 ThreadState *thr = cur_thread(); \ 439 static void ReportMutexHeldWrongContext(ThreadState *thr, uptr pc) { in ReportMutexHeldWrongContext()
|
H A D | tsan_rtl_report.cpp | 130 bool ShouldReport(ThreadState *thr, ReportType typ) { in ShouldReport() 237 ThreadState *thr = tctx->thr; in IsInStackOrTls() 250 ThreadState *thr = tctx->thr; in IsThreadStackOrTls() 613 static bool HandleRacyStacks(ThreadState *thr, VarSizeStackTrace traces[2]) { in HandleRacyStacks() 631 bool OutputReport(ThreadState *thr, const ScopedReport &srep) { in OutputReport() 708 void ReportRace(ThreadState *thr, RawShadow *shadow_mem, Shadow cur, Shadow old, in ReportRace() 825 void PrintCurrentStack(ThreadState *thr, uptr pc) { in PrintCurrentStack()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/go/ |
H A D | tsan_go.cpp | 121 static ThreadState *main_thr; 136 Processor *ThreadState::proc() { in proc() 142 static ThreadState *AllocGoroutine() { in AllocGoroutine() 143 auto *thr = (ThreadState *)Alloc(sizeof(ThreadState)); in AllocGoroutine() 148 void __tsan_init(ThreadState **thrp, Processor **procp, in __tsan_init() 151 ThreadState *thr = AllocGoroutine(); in __tsan_init() 160 ThreadState *thr = main_thr; in __tsan_fini() 169 void __tsan_read(ThreadState *thr, void *addr, void *pc) { in __tsan_read() 173 void __tsan_read_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) { in __tsan_read_pc() 181 void __tsan_write(ThreadState *thr, void *addr, void *pc) { in __tsan_write() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
H A D | tsd_exclusive.h | 18 struct ThreadState { struct 97 if (LIKELY(State.InitState != ThreadState::NotInitialized)) in initThreadMaybe() 136 if (LIKELY(State.InitState == ThreadState::Initialized && in getTSDAndLock() 156 State.InitState = ThreadState::Initialized; in initThread() 165 static thread_local ThreadState State; 174 thread_local ThreadState TSDRegistryExT<Allocator>::State; 193 TSDRegistryT::State.InitState = ThreadState::TornDown; in teardownThread()
|