Home | History | Annotate | Download | only in rtl

Lines Matching refs:uptr

51 extern "C" int pthread_attr_setstacksize(void *attr, uptr stacksize);
52 extern "C" int pthread_attr_getstacksize(void *attr, uptr *stacksize);
63 extern "C" void *__libc_malloc(uptr size);
64 extern "C" void *__libc_calloc(uptr size, uptr n);
65 extern "C" void *__libc_realloc(void *ptr, uptr size);
139 MemoryResetRange(thr, (uptr)&SigCtx, (uptr)ctx, sizeof(*ctx));
149 ScopedInterceptor(ThreadState *thr, const char *fname, uptr pc);
157 uptr pc)
183 const uptr caller_pc = GET_CALLER_PC(); \
185 const uptr pc = __sanitizer::StackTrace::GetCurrentPc(); \
247 int atexit(ThreadState *thr, uptr pc, bool is_on_exit,
252 Release(thr, pc, (uptr)this);
260 void exit(ThreadState *thr, uptr pc) {
274 Acquire(thr, pc, (uptr)this);
323 static void JmpBufGarbageCollect(ThreadState *thr, uptr sp) {
324 for (uptr i = 0; i < thr->jmp_bufs.Size(); i++) {
327 uptr sz = thr->jmp_bufs.Size();
335 static void SetJmp(ThreadState *thr, uptr sp, uptr mangled_sp) {
347 static void LongJmp(ThreadState *thr, uptr *env) {
348 uptr mangled_sp = env[6];
350 for (uptr i = 0; i < thr->jmp_bufs.Size(); i++) {
365 extern "C" void __tsan_setjmp(uptr sp, uptr mangled_sp) {
408 TSAN_INTERCEPTOR(void, longjmp, uptr *env, int val) {
416 TSAN_INTERCEPTOR(void, siglongjmp, uptr *env, int val) {
424 TSAN_INTERCEPTOR(void*, malloc, uptr size) {
436 TSAN_INTERCEPTOR(void*, __libc_memalign, uptr align, uptr sz) {
441 TSAN_INTERCEPTOR(void*, calloc, uptr size, uptr n) {
456 TSAN_INTERCEPTOR(void*, realloc, void *p, uptr size) {
489 TSAN_INTERCEPTOR(uptr, malloc_usable_size, void *p) {
505 void *operator new(__sanitizer::uptr size)
507 void *operator new(__sanitizer::uptr size) {
511 void *operator new[](__sanitizer::uptr size)
513 void *operator new[](__sanitizer::uptr size) {
517 void *operator new(__sanitizer::uptr size, std::nothrow_t const&)
519 void *operator new(__sanitizer::uptr size, std::nothrow_t const&) {
523 void *operator new[](__sanitizer::uptr size, std::nothrow_t const&)
525 void *operator new[](__sanitizer::uptr size, std::nothrow_t const&) {
561 TSAN_INTERCEPTOR(uptr, strlen, const char *s) {
563 uptr len = internal_strlen(s);
564 MemoryAccessRange(thr, pc, (uptr)s, len + 1, false);
568 TSAN_INTERCEPTOR(void*, memset, void *dst, int v, uptr size) {
570 MemoryAccessRange(thr, pc, (uptr)dst, size, true);
574 TSAN_INTERCEPTOR(void*, memcpy, void *dst, const void *src, uptr size) {
576 MemoryAccessRange(thr, pc, (uptr)dst, size, true);
577 MemoryAccessRange(thr, pc, (uptr)src, size, false);
581 TSAN_INTERCEPTOR(int, memcmp, const void *s1, const void *s2, uptr n) {
584 uptr len = 0;
589 MemoryAccessRange(thr, pc, (uptr
590 MemoryAccessRange(thr, pc, (uptr)s2, len < n ? len + 1 : n, false);
594 TSAN_INTERCEPTOR(void*, memchr, void *s, int c, uptr n) {
597 uptr len = res ? (char*)res - (char*)s + 1 : n;
598 MemoryAccessRange(thr, pc, (uptr)s, len, false);
602 TSAN_INTERCEPTOR(void*, memrchr, char *s, int c, uptr n) {
604 MemoryAccessRange(thr, pc, (uptr)s, n, false);
608 TSAN_INTERCEPTOR(void*, memmove, void *dst, void *src, uptr n) {
610 MemoryAccessRange(thr, pc, (uptr)dst, n, true);
611 MemoryAccessRange(thr, pc, (uptr)src, n, false);
618 uptr len = res ? (char*)res - (char*)s + 1 : internal_strlen(s) + 1;
619 MemoryAccessRange(thr, pc, (uptr)s, len, false);
626 uptr len = (char*)res - (char*)s + 1;
627 MemoryAccessRange(thr, pc, (uptr)s, len, false);
633 MemoryAccessRange(thr, pc, (uptr)s, internal_strlen(s) + 1, false);
639 uptr srclen = internal_strlen(src);
640 MemoryAccessRange(thr, pc, (uptr)dst, srclen + 1, true);
641 MemoryAccessRange(thr, pc, (uptr)src, srclen + 1, false);
645 TSAN_INTERCEPTOR(char*, strncpy, char *dst, char *src, uptr n) {
647 uptr srclen = internal_strnlen(src, n);
648 MemoryAccessRange(thr, pc, (uptr)dst, n, true);
649 MemoryAccessRange(thr, pc, (uptr)src, min(srclen + 1, n), false);
656 uptr len1 = internal_strlen(s1);
657 uptr len2 = internal_strlen(s2);
658 MemoryAccessRange(thr, pc, (uptr)s1, len1 + 1, false);
659 MemoryAccessRange(thr, pc, (uptr)s2, len2 + 1, false);
665 if (!IsAppMem((uptr)*addr) || !IsAppMem((uptr)*addr + sz - 1)) {
686 MemoryRangeImitateWrite(thr, pc, (uptr)res, sz);
700 MemoryRangeImitateWrite(thr, pc, (uptr)res, sz);
707 DontNeedShadowFor((uptr)addr, sz);
712 TSAN_INTERCEPTOR(void*, memalign, uptr align, uptr sz) {
717 TSAN_INTERCEPTOR(void*, valloc, uptr sz) {
722 TSAN_INTERCEPTOR(void*, pvalloc, uptr sz) {
728 TSAN_INTERCEPTOR(int, posix_memalign, void **memptr, uptr align, uptr sz) {
743 Acquire(thr, pc, (uptr)g);
753 Release(thr, pc, (uptr)g);
763 uptr iter = (uptr)v;
840 int tid = ThreadCreate(thr, pc, *(uptr*)th, detached);
853 int tid = ThreadTid(thr, pc, (uptr)th);
863 int tid = ThreadTid(thr, pc, (uptr)th);
882 MutexCreate(thr, pc, (uptr)m, false, recursive, false);
891 MutexDestroy(thr, pc, (uptr)m);
900 MutexLock(thr, pc, (uptr)m);
909 MutexLock(thr, pc, (uptr)m);
918 MutexLock(thr, pc, (uptr)m);
925 MutexUnlock(thr, pc, (uptr)m);
934 MutexCreate(thr, pc, (uptr)m, false, false, false);
943 MutexDestroy(thr, pc, (uptr)m);
952 MutexLock(thr, pc, (uptr)m);
961 MutexLock(thr, pc, (uptr)m);
968 MutexUnlock(thr, pc, (uptr)m);
977 MutexCreate(thr, pc, (uptr)m, true, false, false);
986 MutexDestroy(thr, pc, (uptr)m);
995 MutexReadLock(thr, pc, (uptr)m);
1004 MutexReadLock(thr, pc, (uptr)m);
1013 MutexReadLock(thr, pc, (uptr)m);
1022 MutexLock(thr, pc, (uptr)m);
1031 MutexLock(thr, pc, (uptr)m);
1040 MutexLock(thr, pc, (uptr)m);
1047 MutexReadOrWriteUnlock(thr, pc, (uptr)m);
1082 MutexUnlock(thr, pc, (uptr)m);
1084 MutexLock(thr, pc, (uptr)m);
1090 MutexUnlock(thr, pc, (uptr)m);
1092 MutexLock(thr, pc, (uptr)m);
1098 MemoryWrite(thr, pc, (uptr)b, kSizeLog1);
1105 MemoryWrite(thr, pc, (uptr)b, kSizeLog1);
1112 Release(thr, pc, (uptr)b);
1113 MemoryRead(thr, pc, (uptr)b, kSizeLog1);
1115 MemoryRead(thr, pc, (uptr)b, kSizeLog1);
1117 Acquire(thr, pc, (uptr)b);
1135 Release(thr, pc, (uptr)o);
1142 Acquire(thr, pc, (uptr)o);
1163 Acquire(thr, pc, (uptr)s);
1172 Acquire(thr, pc, (uptr)s);
1181 Acquire(thr, pc, (uptr)s);
1188 Release(thr, pc, (uptr)s);
1197 Acquire(thr, pc, (uptr)s);
1532 TSAN_INTERCEPTOR(uptr, fread, void *ptr, uptr size, uptr nmemb, void *f) {
1535 MemoryAccessRange(thr, pc, (uptr)ptr, size * nmemb, true);
1540 TSAN_INTERCEPTOR(uptr, fwrite, const void *p, uptr size, uptr nmemb, void *f) {
1543 MemoryAccessRange(thr, pc, (uptr)p, size * nmemb, false);
1561 MemoryAccessRange(thr, pc, (uptr)s, internal_strlen(s), false);
1752 TSAN_INTERCEPTOR(int, mlock, const void *addr, uptr len) {
1757 TSAN_INTERCEPTOR(int, munlock, const void *addr, uptr len) {
1787 const uptr caller_pc;
1788 const uptr pc;
1806 ((TsanInterceptorContext *)ctx)->pc, (uptr)ptr, size, \
1810 ((TsanInterceptorContext *) ctx)->pc, (uptr) ptr, size, \
1864 uptr pc = signal->sigaction ?
1865 (uptr)sigactions[sig].sa_sigaction :
1866 (uptr)sigactions[sig].sa_handler;
1887 uptr pc = 0;