/external/compiler-rt/test/asan/TestCases/Windows/ |
H A D | thread_suspended.cc | 15 HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, CREATE_SUSPENDED, NULL); local 16 ResumeThread(thr); 17 if (thr == 0) 19 if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE)) 22 GetExitCodeThread(thr, &exitcode); 25 CloseHandle(thr);
|
H A D | thread_stack_reuse.cc | 22 HANDLE thr = NULL; local 24 thr = CreateThread(NULL, 0, thread_proc_1, NULL, 0, NULL); 25 if (thr == 0) 27 if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE)) 30 thr = CreateThread(NULL, 0, thread_proc_2, NULL, 0, NULL); 31 if (thr == 0) 33 if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE)) 35 CloseHandle(thr);
|
H A D | beginthreadex.cc | 15 HANDLE thr = (HANDLE)_beginthreadex(NULL, 0, thread_proc, NULL, 0, NULL); local 16 if (thr == 0) 18 if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE)) 20 CloseHandle(thr);
|
H A D | thread_simple.cc | 15 HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL); local 16 if (thr == 0) 18 if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE)) 21 GetExitCodeThread(thr, &exitcode); 24 CloseHandle(thr);
|
H A D | dll_thread_stack_array_left_oob.cc | 26 HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL); local 31 if (thr == 0) 33 if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE))
|
H A D | thread_stack_array_left_oob.cc | 19 HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL); local 24 if (thr == 0) return 0; 26 WaitForSingleObject(thr, INFINITE);
|
H A D | thread_stack_array_right_oob.cc | 19 HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL); local 24 if (thr == 0) return 0; 26 WaitForSingleObject(thr, INFINITE);
|
H A D | thread_stress.cc | 16 HANDLE thr[NUM_THREADS]; local 18 thr[i] = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL); 19 if (thr[i] == 0) 23 if (WAIT_OBJECT_0 != WaitForSingleObject(thr[i], INFINITE)) 25 CloseHandle(thr[i]);
|
/external/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_fd.h | 42 void FdAcquire(ThreadState *thr, uptr pc, int fd); 43 void FdRelease(ThreadState *thr, uptr pc, int fd); 44 void FdAccess(ThreadState *thr, uptr pc, int fd); 45 void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true); 46 void FdFileCreate(ThreadState *thr, uptr pc, int fd); 47 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write); 48 void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd); 49 void FdEventCreate(ThreadState *thr, uptr pc, int fd); 50 void FdSignalCreate(ThreadState *thr, uptr pc, int fd); 51 void FdInotifyCreate(ThreadState *thr, upt [all...] |
H A D | tsan_rtl_thread.cc | 27 , thr() 49 ThreadState *thr; member in struct:__tsan::OnCreatedArgs 54 thr = 0; 58 if (!args->thr) // GCD workers don't have a parent thread. 60 args->thr->fast_state.IncrementEpoch(); 62 TraceAddEvent(args->thr, args->thr->fast_state, EventTypeMop, 0); 63 ReleaseImpl(args->thr, 0, &sync); 64 creation_stack_id = CurrentStackId(args->thr, args->pc); 66 StatInc(args->thr, StatThreadMaxTi 81 ThreadState *thr; member in struct:__tsan::OnStartedArgs 185 ThreadCheckIgnore(ThreadState *thr) argument 194 ThreadCheckIgnore(ThreadState *thr) argument 197 ThreadFinalize(ThreadState *thr) argument 215 ThreadCount(ThreadState *thr) argument 221 ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached) argument 232 ThreadStart(ThreadState *thr, int tid, uptr os_id) argument 277 ThreadFinish(ThreadState *thr) argument 297 ThreadTid(ThreadState *thr, uptr pc, uptr uid) argument 303 ThreadJoin(ThreadState *thr, uptr pc, int tid) argument 310 ThreadDetach(ThreadState *thr, uptr pc, int tid) argument 316 ThreadSetName(ThreadState *thr, const char *name) argument 320 MemoryAccessRange(ThreadState *thr, uptr pc, uptr addr, uptr size, bool is_write) argument [all...] |
H A D | tsan_rtl_proc.cc | 25 proc->thr = nullptr; 35 CHECK_EQ(proc->thr, nullptr); 47 void ProcWire(Processor *proc, ThreadState *thr) { argument 48 CHECK_EQ(thr->proc1, nullptr); 49 CHECK_EQ(proc->thr, nullptr); 50 thr->proc1 = proc; 51 proc->thr = thr; 54 void ProcUnwire(Processor *proc, ThreadState *thr) { argument 55 CHECK_EQ(thr [all...] |
H A D | tsan_rtl_mutex.cc | 26 void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r); 29 ThreadState *thr; member in struct:__tsan::Callback 32 Callback(ThreadState *thr, uptr pc) argument 33 : thr(thr) 35 DDCallback::pt = thr->proc()->dd_pt; 36 DDCallback::lt = thr->dd_lt; 39 u32 Unwind() override { return CurrentStackId(thr, pc); } 40 int UniqueTid() override { return thr->unique_id; } 43 void DDMutexInit(ThreadState *thr, upt argument 49 ReportMutexMisuse(ThreadState *thr, uptr pc, ReportType typ, uptr addr, u64 mid) argument 65 MutexCreate(ThreadState *thr, uptr pc, uptr addr, bool rw, bool recursive, bool linker_init) argument 84 MutexDestroy(ThreadState *thr, uptr pc, uptr addr) argument 144 MutexLock(ThreadState *thr, uptr pc, uptr addr, int rec, bool try_lock) argument 189 MutexUnlock(ThreadState *thr, uptr pc, uptr addr, bool all) argument 232 MutexReadLock(ThreadState *thr, uptr pc, uptr addr, bool trylock) argument 267 MutexReadUnlock(ThreadState *thr, uptr pc, uptr addr) argument 299 MutexReadOrWriteUnlock(ThreadState *thr, uptr pc, uptr addr) argument 346 MutexRepair(ThreadState *thr, uptr pc, uptr addr) argument 354 MutexInvalidAccess(ThreadState *thr, uptr pc, uptr addr) argument 362 Acquire(ThreadState *thr, uptr pc, uptr addr) argument 374 ThreadState *thr = reinterpret_cast<ThreadState*>(arg); local 382 AcquireGlobal(ThreadState *thr, uptr pc) argument 391 Release(ThreadState *thr, uptr pc, uptr addr) argument 403 ReleaseStore(ThreadState *thr, uptr pc, uptr addr) argument 417 ThreadState *thr = reinterpret_cast<ThreadState*>(arg); local 425 AfterSleep(ThreadState *thr, uptr pc) argument 436 AcquireImpl(ThreadState *thr, uptr pc, SyncClock *c) argument 444 ReleaseImpl(ThreadState *thr, uptr pc, SyncClock *c) argument 453 ReleaseStoreImpl(ThreadState *thr, uptr pc, SyncClock *c) argument 462 AcquireReleaseImpl(ThreadState *thr, uptr pc, SyncClock *c) argument 472 ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r) argument [all...] |
H A D | tsan_fd.cc | 50 static FdSync *allocsync(ThreadState *thr, uptr pc) { argument 51 FdSync *s = (FdSync*)user_alloc(thr, pc, sizeof(FdSync), kDefaultAlignment, 63 static void unref(ThreadState *thr, uptr pc, FdSync *s) { argument 69 user_free(thr, pc, s, false); 74 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { argument 82 void *p = user_alloc(thr, pc, size, kDefaultAlignment, false); 84 MemoryResetRange(thr, (uptr)&fddesc, (uptr)p, size); 88 user_free(thr, pc, p, false); 94 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, argument 96 FdDesc *d = fddesc(thr, p 128 FdOnFork(ThreadState *thr, uptr pc) argument 160 FdAcquire(ThreadState *thr, uptr pc, int fd) argument 171 FdRelease(ThreadState *thr, uptr pc, int fd) argument 182 FdAccess(ThreadState *thr, uptr pc, int fd) argument 190 FdClose(ThreadState *thr, uptr pc, int fd, bool write) argument 218 FdFileCreate(ThreadState *thr, uptr pc, int fd) argument 225 FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) argument 236 FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd) argument 244 FdEventCreate(ThreadState *thr, uptr pc, int fd) argument 251 FdSignalCreate(ThreadState *thr, uptr pc, int fd) argument 258 FdInotifyCreate(ThreadState *thr, uptr pc, int fd) argument 265 FdPollCreate(ThreadState *thr, uptr pc, int fd) argument 272 FdSocketCreate(ThreadState *thr, uptr pc, int fd) argument 280 FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) argument 289 FdSocketConnecting(ThreadState *thr, uptr pc, int fd) argument 297 FdSocketConnect(ThreadState *thr, uptr pc, int fd) argument [all...] |
H A D | tsan_update_shadow_word_inl.h | 17 StatInc(thr, StatShadowProcessed); 22 StatInc(thr, StatShadowZero); 31 StatInc(thr, StatShadowSameSize); 34 StatInc(thr, StatShadowSameThread); 39 StatInc(thr, StatShadowAnotherThread); 40 if (HappensBefore(old, thr)) { 51 StatInc(thr, StatShadowIntersect); 53 StatInc(thr, StatShadowSameThread); 56 StatInc(thr, StatShadowAnotherThread); 59 if (HappensBefore(old, thr)) [all...] |
H A D | tsan_rtl.cc | 308 void Initialize(ThreadState *thr) { argument 336 ProcWire(proc, thr); 365 int tid = ThreadCreate(thr, 0, 0, true); 367 ThreadStart(thr, tid, internal_getpid()); 387 int Finalize(ThreadState *thr) { argument 390 if (flags()->atexit_sleep_ms > 0 && ThreadCount(thr) > 1) 403 ThreadFinalize(thr); 430 StatAggregate(ctx->stat, thr->stat); 438 void ForkBefore(ThreadState *thr, uptr pc) { argument 443 void ForkParentAfter(ThreadState *thr, upt argument 448 ForkChildAfter(ThreadState *thr, uptr pc) argument 472 GrowShadowStack(ThreadState *thr) argument 485 CurrentStackId(ThreadState *thr, uptr pc) argument 505 TraceSwitch(ThreadState *thr) argument 521 TraceTopPC(ThreadState *thr) argument 563 HandleRace(ThreadState *thr, u64 *shadow_mem, Shadow cur, Shadow old) argument 575 HappensBefore(Shadow old, ThreadState *thr) argument 580 MemoryAccessImpl1(ThreadState *thr, uptr addr, int kAccessSizeLog, bool kAccessIsWrite, bool kIsAtomic, u64 *shadow_mem, Shadow cur) argument 636 UnalignedMemoryAccess(ThreadState *thr, uptr pc, uptr addr, int size, bool kAccessIsWrite, bool kIsAtomic) argument 745 MemoryAccess(ThreadState *thr, uptr pc, uptr addr, int kAccessSizeLog, bool kAccessIsWrite, bool kIsAtomic) argument 811 MemoryAccessImpl(ThreadState *thr, uptr addr, int kAccessSizeLog, bool kAccessIsWrite, bool kIsAtomic, u64 *shadow_mem, Shadow cur) argument 827 MemoryRangeSet(ThreadState *thr, uptr pc, uptr addr, uptr size, u64 val) argument 888 MemoryResetRange(ThreadState *thr, uptr pc, uptr addr, uptr size) argument 892 MemoryRangeFreed(ThreadState *thr, uptr pc, uptr addr, uptr size) argument 914 MemoryRangeImitateWrite(ThreadState *thr, uptr pc, uptr addr, uptr size) argument 927 FuncEntry(ThreadState *thr, uptr pc) argument 949 FuncExit(ThreadState *thr) argument 964 ThreadIgnoreBegin(ThreadState *thr, uptr pc) argument 975 ThreadIgnoreEnd(ThreadState *thr, uptr pc) argument 987 ThreadIgnoreSyncBegin(ThreadState *thr, uptr pc) argument 997 ThreadIgnoreSyncEnd(ThreadState *thr, uptr pc) argument [all...] |
H A D | tsan_mman.cc | 83 ThreadState *thr = cur_thread(); local 84 if (thr->proc()) 101 ProcWire(gp->proc, thr); 106 ThreadState *thr = cur_thread(); local 107 if (thr->proc() != gp->proc) 109 ProcUnwire(gp->proc, thr); 135 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { argument 136 if (atomic_load_relaxed(&thr->in_signal_handler) == 0 || 140 ObtainCurrentStack(thr, pc, &stack); 146 OutputReport(thr, re 149 user_alloc(ThreadState *thr, uptr pc, uptr sz, uptr align, bool signal) argument 162 user_calloc(ThreadState *thr, uptr pc, uptr size, uptr n) argument 171 user_free(ThreadState *thr, uptr pc, void *p, bool signal) argument 180 OnUserAlloc(ThreadState *thr, uptr pc, uptr p, uptr sz, bool write) argument 189 OnUserFree(ThreadState *thr, uptr pc, uptr p, bool write) argument 197 user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz) argument 227 ThreadState *thr = cur_thread(); local 235 ThreadState *thr = cur_thread(); local 243 ThreadState *thr = cur_thread(); local 252 ThreadState *thr = cur_thread(); local 298 ThreadState *thr = cur_thread(); local [all...] |
H A D | tsan_interceptors.h | 11 ScopedInterceptor(ThreadState *thr, const char *fname, uptr pc); 24 ThreadState *thr = cur_thread(); \ 26 ScopedInterceptor si(thr, #func, caller_pc); \ 37 if (!thr->is_inited || thr->ignore_interceptors || thr->in_ignored_lib) \
|
/external/compiler-rt/lib/tsan/dd/ |
H A D | dd_rtl.cc | 22 static u32 CurrentStackTrace(Thread *thr, uptr skip) { argument 24 thr->ignore_interceptors = true; 26 thr->ignore_interceptors = false; 32 static void PrintStackTrace(Thread *thr, u32 stk) { argument 34 thr->ignore_interceptors = true; 36 thr->ignore_interceptors = false; 39 static void ReportDeadlock(Thread *thr, DDReport *rep) { argument 48 PrintStackTrace(thr, rep->loop[i].stk[1]); 52 PrintStackTrace(thr, rep->loop[i].stk[0]); 58 Callback::Callback(Thread *thr) argument 100 ThreadInit(Thread *thr) argument 107 ThreadDestroy(Thread *thr) argument 112 MutexBeforeLock(Thread *thr, uptr m, bool writelock) argument 125 MutexAfterLock(Thread *thr, uptr m, bool writelock, bool trylock) argument 138 MutexBeforeUnlock(Thread *thr, uptr m, bool writelock) argument 149 MutexDestroy(Thread *thr, uptr m) argument [all...] |
H A D | dd_rtl.h | 35 Thread *thr; member in struct:__dsan::Callback 37 Callback(Thread *thr); 58 void ThreadInit(Thread *thr); 59 void ThreadDestroy(Thread *thr); 61 void MutexBeforeLock(Thread *thr, uptr m, bool writelock); 62 void MutexAfterLock(Thread *thr, uptr m, bool writelock, bool trylock); 63 void MutexBeforeUnlock(Thread *thr, uptr m, bool writelock); 64 void MutexDestroy(Thread *thr, uptr m);
|
/external/valgrind/drd/tests/ |
H A D | pth_create_glibc_2_0.c | 28 pthread_t thr; local 30 result = (*pthread_create_glibc_2_0)(&thr, 0, thread_func, 0); 36 pthread_join(thr, 0);
|
/external/compiler-rt/lib/tsan/go/ |
H A D | tsan_go.cc | 135 ThreadState *thr = (ThreadState*)internal_alloc(MBlockThreadContex, local 137 internal_memset(thr, 0, sizeof(*thr)); 138 return thr; 144 ThreadState *thr = AllocGoroutine(); local 145 main_thr = *thrp = thr; 146 Initialize(thr); 147 *procp = thr->proc1; 153 ThreadState *thr = main_thr; local 154 int res = Finalize(thr); 162 __tsan_read(ThreadState *thr, void *addr, void *pc) argument 166 __tsan_read_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) argument 174 __tsan_write(ThreadState *thr, void *addr, void *pc) argument 178 __tsan_write_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) argument 186 __tsan_read_range(ThreadState *thr, void *addr, uptr size, uptr pc) argument 190 __tsan_write_range(ThreadState *thr, void *addr, uptr size, uptr pc) argument 194 __tsan_func_enter(ThreadState *thr, void *pc) argument 198 __tsan_func_exit(ThreadState *thr) argument 202 __tsan_malloc(ThreadState *thr, uptr pc, uptr p, uptr sz) argument 214 ThreadState *thr = AllocGoroutine(); local 220 __tsan_go_end(ThreadState *thr) argument 233 __tsan_acquire(ThreadState *thr, void *addr) argument 237 __tsan_release(ThreadState *thr, void *addr) argument 241 __tsan_release_merge(ThreadState *thr, void *addr) argument 245 __tsan_finalizer_goroutine(ThreadState *thr) argument 249 __tsan_mutex_before_lock(ThreadState *thr, uptr addr, uptr write) argument 252 __tsan_mutex_after_lock(ThreadState *thr, uptr addr, uptr write) argument 259 __tsan_mutex_before_unlock(ThreadState *thr, uptr addr, uptr write) argument 266 __tsan_go_ignore_sync_begin(ThreadState *thr) argument 270 __tsan_go_ignore_sync_end(ThreadState *thr) argument [all...] |
H A D | test.c | 17 void __tsan_init(void **thr, void **proc, void (*cb)(long, void*)); 20 void __tsan_go_start(void *thr, void **chthr, void *pc); 21 void __tsan_go_end(void *thr); 24 void __tsan_proc_wire(void *proc, void *thr); 25 void __tsan_proc_unwire(void *proc, void *thr); 26 void __tsan_read(void *thr, void *addr, void *pc); 27 void __tsan_write(void *thr, void *addr, void *pc); 28 void __tsan_func_enter(void *thr, void *pc); 29 void __tsan_func_exit(void *thr); 30 void __tsan_malloc(void *thr, voi [all...] |
/external/compiler-rt/lib/tsan/tests/unit/ |
H A D | tsan_mman_test.cc | 38 ThreadState *thr = cur_thread(); local 40 char *p = (char*)user_alloc(thr, pc, 10); 42 char *p2 = (char*)user_alloc(thr, pc, 20); 47 user_free(thr, pc, p); 48 user_free(thr, pc, p2); 52 ThreadState *thr = cur_thread(); local 55 void *p = user_realloc(thr, pc, 0, 0); 61 void *p = user_realloc(thr, pc, 0, 100); 64 user_free(thr, pc, p); 67 void *p = user_alloc(thr, p 97 ThreadState *thr = cur_thread(); local 110 ThreadState *thr = cur_thread(); local [all...] |
H A D | tsan_stack_test.cc | 22 ThreadState thr(0, 0, 0, 0, 0, 0, 0, 0, 0); 24 thr.shadow_stack = &stack[0]; 25 thr.shadow_stack_pos = &stack[0]; 26 thr.shadow_stack_end = &stack[128]; 28 ObtainCurrentStack(&thr, 0, trace); 31 ObtainCurrentStack(&thr, 42, trace); 35 *thr.shadow_stack_pos++ = 100; 36 *thr.shadow_stack_pos++ = 101; 37 ObtainCurrentStack(&thr, 0, trace); 42 ObtainCurrentStack(&thr, 4 [all...] |
/external/compiler-rt/test/tsan/ |
H A D | sunrpc.cc | 8 void *thr(void *p) { function 18 pthread_create(&th[0], 0, thr, 0); 19 pthread_create(&th[1], 0, thr, 0);
|