/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_platform.h | 73 static const uptr kMetaShadowBeg = 0x300000000000ull; 74 static const uptr kMetaShadowEnd = 0x380000000000ull; 75 static const uptr kShadowBeg = 0x100000000000ull; 76 static const uptr kShadowEnd = 0x300000000000ull; 77 static const uptr kHeapMemBeg = 0x720000000000ull; 78 static const uptr kHeapMemEnd = 0x730000000000ull; 79 static const uptr kLoAppMemBeg = 0x000000001000ull; 80 static const uptr kLoAppMemEnd = 0x020000000000ull; 81 static const uptr kMidAppMemBeg = 0x550000000000ull; 82 static const uptr kMidAppMemEn [all...] |
H A D | tsan_rtl.h | 63 static const uptr kSpaceBeg = 0; 65 static const uptr kMetadataSize = 0; 67 static const uptr kRegionSizeLog = 20; 70 static const uptr kFlags = 0; 80 static const uptr kSpaceBeg = Mapping::kHeapMemBeg; 81 static const uptr kSpaceSize = Mapping::kHeapMemEnd - Mapping::kHeapMemBeg; 82 static const uptr kMetadataSize = 0; 85 static const uptr kFlags = 0; 98 uptr sp; 101 uptr in_signal_handler; [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/asan_abi/ |
H A D | asan_abi_shim.cpp | 15 void __asan_register_image_globals(uptr *flag) { in __asan_register_image_globals() 18 void __asan_unregister_image_globals(uptr *flag) { in __asan_unregister_image_globals() 21 void __asan_register_elf_globals(uptr *flag, void *start, void *stop) { in __asan_register_elf_globals() 26 void __asan_unregister_elf_globals(uptr *flag, void *start, void *stop) { in __asan_unregister_elf_globals() 31 void __asan_register_globals(__asan_global *globals, uptr n) { in __asan_register_globals() 34 void __asan_unregister_globals(__asan_global *globals, uptr n) { in __asan_unregister_globals() 45 void *__asan_memcpy(void *dst, const void *src, uptr size) { in __asan_memcpy() 48 void *__asan_memset(void *s, int c, uptr n) { in __asan_memset() 51 void *__asan_memmove(void *dest, const void *src, uptr n) { in __asan_memmove() 57 static_assert(sizeof(uptr) == 8 || sizeof(uptr) == 4); in __asan_init() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/asan/ |
H A D | asan_interface_internal.h | 24 using __sanitizer::uptr; 49 uptr beg; // The address of the global. 50 uptr size; // The original size of the global. 51 uptr size_with_redzone; // The size with the redzone. 55 uptr has_dynamic_init; // Non-zero if the global has dynamic initializer. 60 uptr odr_indicator; // The address of the ODR indicator symbol. 67 void __asan_register_image_globals(uptr *flag); 69 void __asan_unregister_image_globals(uptr *flag); 72 void __asan_register_elf_globals(uptr *flag, void *start, void *stop); 74 void __asan_unregister_elf_globals(uptr *flag, void *start, void *stop); [all …]
|
H A D | asan_fake_stack.h | 23 uptr magic; // Modified by the instrumented code. 24 uptr descr; // Modified by the instrumented code. 25 uptr pc; // Modified by the instrumented code. 26 uptr real_stack; 57 static const uptr kMinStackFrameSizeLog = 6; // Min frame is 64B. 58 static const uptr kMaxStackFrameSizeLog = 16; // Max stack frame is 64K. 61 static const uptr kNumberOfSizeClasses = 65 static FakeStack *Create(uptr stack_size_log); 70 static uptr SizeRequiredForFlags(uptr stack_size_log) { in SizeRequiredForFlags() 71 return ((uptr)1) << (stack_size_log + 1 - kMinStackFrameSizeLog); in SizeRequiredForFlags() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
H A D | release.h | 22 RegionReleaseRecorder(MemMapT *RegionMemMap, uptr Base, uptr Offset = 0) 25 uptr getReleasedRangesCount() const { return ReleasedRangesCount; } in getReleasedRangesCount() 27 uptr getReleasedBytes() const { return ReleasedBytes; } in getReleasedBytes() 29 uptr getBase() const { return Base; } in getBase() 33 void releasePageRangeToOS(uptr From, uptr To) { in releasePageRangeToOS() 34 const uptr Size = To - From; in releasePageRangeToOS() 41 uptr ReleasedRangesCount = 0; 42 uptr ReleasedByte [all...] |
H A D | size_class_map.h | 18 inline uptr scaledLog2(uptr Size, uptr ZeroLog, uptr LogBits) { in scaledLog2() 19 const uptr L = getMostSignificantSetBitIndex(Size); in scaledLog2() 20 const uptr LBits = (Size >> (L - LogBits)) - (1 << LogBits); in scaledLog2() 21 const uptr HBits = (L - ZeroLog) << LogBits; in scaledLog2() 26 static u16 getMaxCachedHint(uptr Size) { in getMaxCachedHint() 64 static const uptr MinSize = 1UL << Config::MinSizeLog; 65 static const uptr MidSiz [all...] |
H A D | common.h | 31 inline constexpr bool isPowerOfTwo(uptr X) { in isPowerOfTwo() 37 inline constexpr uptr roundUp(uptr X, uptr Boundary) { in roundUp() 41 inline constexpr uptr roundUpSlow(uptr X, uptr Boundary) { in roundUpSlow() 45 inline constexpr uptr roundDown(uptr X, uptr Boundary) { in roundDown() 49 inline constexpr uptr roundDownSlow(uptr X, uptr Boundary) { in roundDownSlow() 53 inline constexpr bool isAligned(uptr X, uptr Alignment) { in isAligned() 57 inline constexpr bool isAlignedSlow(uptr X, uptr Alignment) { in isAlignedSlow() 71 inline uptr getMostSignificantSetBitIndex(uptr X) { in getMostSignificantSetBitIndex() 73 return SCUDO_WORDSIZE - 1U - static_cast<uptr>(__builtin_clzl(X)); in getMostSignificantSetBitIndex() 76 inline uptr roundUpPowerOfTwo(uptr Size) { in roundUpPowerOfTwo() [all …]
|
H A D | mem_map_fuchsia.h | 26 bool mapImpl(uptr Addr, uptr Size, const char *Name, uptr Flags); 27 void unmapImpl(uptr Addr, uptr Size); 28 bool remapImpl(uptr Addr, uptr Size, const char *Name, uptr Flags); 29 void setMemoryPermissionImpl(uptr Addr, uptr Size, uptr Flags); 30 void releasePagesToOSImpl(uptr From, uptr Size) { in releasePagesToOSImpl() 33 void releaseAndZeroPagesToOSImpl(uptr From, uptr Size); 34 uptr getBaseImpl() { return WindowBase; } in getBaseImpl() 35 uptr getCapacityImpl() { return WindowSize; } in getCapacityImpl() 41 MemMapFuchsia(uptr Base, uptr Capacity); 44 uptr MapAddr = 0; [all …]
|
H A D | memtag.h | 35 inline constexpr uptr archMemoryTagGranuleSize() { return 16; } in archMemoryTagGranuleSize() 37 inline uptr untagPointer(uptr Ptr) { return Ptr & ((1ULL << 56) - 1); } in untagPointer() 39 inline uint8_t extractTag(uptr Ptr) { return (Ptr >> 56) & 0xf; } in extractTag() 45 inline NORETURN uptr archMemoryTagGranuleSize() { 49 inline NORETURN uptr untagPointer(uptr Ptr) { 54 inline NORETURN uint8_t extractTag(uptr Ptr) { 124 uptr PrevTCO; 148 inline uptr selectRandomTag(uptr Ptr, uptr ExcludeMask) { in selectRandomTag() 150 uptr TaggedPtr; in selectRandomTag() 161 inline uptr addFixedTag(uptr Ptr, uptr Tag) { in addFixedTag() [all …]
|
H A D | mem_map.h | 34 MemMapDefault(uptr Base, uptr Capacity) : Base(Base), Capacity(Capacity) {} 37 bool mapImpl(uptr Addr, uptr Size, const char *Name, uptr Flags); 38 void unmapImpl(uptr Addr, uptr Size); 39 bool remapImpl(uptr Addr, uptr Size, const char *Name, uptr Flag [all...] |
/freebsd/contrib/llvm-project/compiler-rt/lib/hwasan/ |
H A D | hwasan_interface_internal.h | 37 using __sanitizer::uptr; 48 void __hwasan_init_frames(uptr, uptr); 51 extern uptr __hwasan_shadow_memory_dynamic_address; 54 void __hwasan_loadN(uptr, uptr); 56 void __hwasan_load1(uptr); 58 void __hwasan_load2(uptr); 60 void __hwasan_load4(uptr); 62 void __hwasan_load8(uptr); [all...] |
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_common.h | 38 const uptr kWordSize = SANITIZER_WORDSIZE / 8; 39 const uptr kWordSizeInBits = 8 * kWordSize; 41 const uptr kCacheLineSize = SANITIZER_CACHE_LINE_SIZE; 43 const uptr kMaxPathLength = 4096; 45 const uptr kMaxThreadStackSize = 1 << 30; // 1Gb 47 const uptr kErrorMessageBufferSize = 1 << 16; 65 inline uptr GetPageSize() { return 4096; } in GetPageSize() 66 inline uptr GetPageSizeCached() { return 4096; } in GetPageSizeCached() 68 uptr GetPageSize(); 69 extern uptr PageSizeCached; [all …]
|
H A D | sanitizer_allocator_primary64.h | 52 bool GetAndResetStats(uptr &ranges, uptr &bytes) { in GetAndResetStats() 60 u64 *MapPackedCounterArrayBuffer(uptr count) { in MapPackedCounterArrayBuffer() 67 void ReleasePageRangeToOS(uptr class_id, CompactPtrT from, CompactPtrT to) { in ReleasePageRangeToOS() 68 const uptr region_base = allocator_.GetRegionBeginBySizeClass(class_id); in ReleasePageRangeToOS() 69 const uptr from_page = allocator_.CompactPtrToPointer(region_base, from); in ReleasePageRangeToOS() 70 const uptr to_page = allocator_.CompactPtrToPointer(region_base, to); in ReleasePageRangeToOS() 78 uptr released_ranges_count_ = 0; 79 uptr released_bytes_ = 0; 87 static const uptr kSpaceBeg = Params::kSpaceBeg; 88 static const uptr kSpaceSize = Params::kSpaceSize; [all …]
|
H A D | sanitizer_stacktrace.h | 43 const uptr *trace; 53 StackTrace(const uptr *trace, u32 size) : trace(trace), size(size), tag(0) {} in StackTrace() 54 StackTrace(const uptr *trace, u32 size, u32 tag) in StackTrace() 68 uptr PrintTo(char *out_buf, uptr out_buf_size) const; 78 static uptr GetCurrentPc(); 79 static inline uptr GetPreviousInstructionPc(uptr pc); 80 static uptr GetNextInstructionPc(uptr pc); 85 uptr StackTrace::GetPreviousInstructionPc(uptr pc) { in GetPreviousInstructionPc() 110 uptr trace_buffer[kStackTraceMax]; 111 uptr top_frame_bp; // Optional bp of a top frame. [all …]
|
H A D | sanitizer_allocator_primary32.h | 56 static const uptr kSpaceBeg = Params::kSpaceBeg; 58 static const uptr kMetadataSize = Params::kMetadataSize; 60 static const uptr kRegionSizeLog = Params::kRegionSizeLog; 77 static const uptr kMaxNumCached = SizeClassMap::kMaxNumCachedHint - 2; 78 void SetFromArray(void *batch[], uptr count) { in SetFromArray() 81 for (uptr i = 0; i < count; i++) in SetFromArray() 84 uptr Count() const { return count_; } in Count() 91 for (uptr i = 0, n = Count(); i < n; i++) in CopyToArray() 96 static uptr AllocationSizeRequiredForNElements(uptr n) { in AllocationSizeRequiredForNElements() 97 return sizeof(uptr) * 2 + sizeof(void *) * n; in AllocationSizeRequiredForNElements() [all …]
|
H A D | sanitizer_posix.h | 29 uptr internal_open(const char *filename, int flags); 30 uptr internal_open(const char *filename, int flags, u32 mode); 31 uptr internal_close(fd_t fd); 33 uptr internal_read(fd_t fd, void *buf, uptr count); 34 uptr internal_write(fd_t fd, const void *buf, uptr count); 37 uptr internal_mmap(void *addr, uptr length, int prot, int flags, 39 uptr internal_munmap(void *addr, uptr length); 41 uptr internal_mremap(void *old_address, uptr old_size, uptr new_size, int flags, 44 int internal_mprotect(void *addr, uptr length, int prot); 45 int internal_madvise(uptr addr, uptr length, int advice); [all …]
|
H A D | sanitizer_deadlock_detector.h | 48 void ensureCurrentEpoch(uptr current_epoch) { in ensureCurrentEpoch() 56 uptr getEpoch() const { return epoch_; } in getEpoch() 59 bool addLock(uptr lock_id, uptr current_epoch, u32 stk) { in addLock() 75 void removeLock(uptr lock_id) { in removeLock() 99 u32 findLockContext(uptr lock_id) { in findLockContext() 100 for (uptr i = 0; i < n_all_locks_; i++) in findLockContext() 106 const BV &getLocks(uptr current_epoch) const { in getLocks() 111 uptr getNumLocks() const { return n_all_locks_; } in getNumLocks() 112 uptr getLock(uptr idx) const { return all_locks_with_contexts_[idx].lock; } in getLock() 116 uptr epoch_; [all …]
|
H A D | sanitizer_allocator_size_class_map.h | 119 template <uptr kNumBits, uptr kMinSizeLog, uptr kMidSizeLog, uptr kMaxSizeLog, 120 uptr kMaxNumCachedHintT, uptr kMaxBytesCachedLog> 122 static const uptr kMinSize = 1 << kMinSizeLog; 123 static const uptr kMidSize = 1 << kMidSizeLog; 124 static const uptr kMidClass = kMidSize / kMinSize; 125 static const uptr S = kNumBits - 1; 126 static const uptr M = (1 << S) - 1; 131 static const uptr kMaxNumCachedHint = kMaxNumCachedHintT; 134 static const uptr kMaxSize = 1UL << kMaxSizeLog; 135 static const uptr kNumClasses = [all …]
|
H A D | sanitizer_win.cpp | 70 uptr GetPageSize() { in GetPageSize() 76 uptr GetMmapGranularity() { in GetMmapGranularity() 82 uptr GetMaxUserVirtualAddress() { in GetMaxUserVirtualAddress() 85 return (uptr)si.lpMaximumApplicationAddress; in GetMaxUserVirtualAddress() 88 uptr GetMaxVirtualAddress() { in GetMaxVirtualAddress() 101 uptr internal_getpid() { in internal_getpid() 115 uptr GetThreadSelf() { in GetThreadSelf() 120 void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top, in GetThreadStackTopAndBottom() 121 uptr *stack_bottom) { in GetThreadStackTopAndBottom() 129 *stack_top = (uptr)mbi.BaseAddress + mbi.RegionSize; in GetThreadStackTopAndBottom() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/lsan/ |
H A D | lsan_common.h | 88 bool WordIsPoisoned(uptr addr); 105 bool GetThreadRangesLocked(tid_t os_id, uptr *stack_begin, uptr *stack_end, 106 uptr *tls_begin, uptr *tls_end, uptr *cache_begin, 107 uptr *cache_end, DTLS **dtls); 108 void GetAllThreadAllocatorCachesLocked(InternalMmapVector<uptr> *caches); 112 void GetAdditionalThreadContextPtrsLocked(InternalMmapVector<uptr> *ptrs); 128 void GetAllocatorGlobalRange(uptr *begi [all...] |
H A D | lsan_allocator.h | 24 void *Allocate(const StackTrace &stack, uptr size, uptr alignment, 27 void *Reallocate(const StackTrace &stack, void *p, uptr new_size, 28 uptr alignment); 29 uptr GetMallocUsableSize(const void *p); 34 void GetAllocatorCacheRange(uptr *begin, uptr *end); 45 uptr requested_size : 54; 47 uptr requested_size : 32; 48 uptr paddin [all...] |
/freebsd/contrib/llvm-project/compiler-rt/lib/msan/ |
H A D | msan_allocator.cpp | 30 uptr requested_size; 34 void OnMap(uptr p, uptr size) const {} in OnMap() 35 void OnMapSecondary(uptr p, uptr size, uptr user_begin, in OnMapSecondary() 36 uptr user_size) const {} in OnMapSecondary() 37 void OnUnmap(uptr p, uptr size) const { in OnUnmap() 42 uptr shadow_p = MEM_TO_SHADOW(p); in OnUnmap() 45 uptr origin_p = MEM_TO_ORIGIN(p); in OnUnmap() 55 static const uptr kMaxAllowedMallocSize = 2UL << 30; 58 static const uptr kSpaceBeg = 0; 60 static const uptr kMetadataSize = sizeof(Metadata); [all …]
|
H A D | msan_poisoning.cpp | 20 DECLARE_REAL(void *, memset, void *dest, int c, uptr n) 21 DECLARE_REAL(void *, memcpy, void *dest, const void *src, uptr n) 22 DECLARE_REAL(void *, memmove, void *dest, const void *src, uptr n) 26 u32 GetOriginIfPoisoned(uptr addr, uptr size) { in GetOriginIfPoisoned() 28 for (uptr i = 0; i < size; ++i) in GetOriginIfPoisoned() 29 if (s[i]) return *(u32 *)SHADOW_TO_ORIGIN(((uptr)s + i) & ~3UL); in GetOriginIfPoisoned() 33 void SetOriginIfPoisoned(uptr addr, uptr src_shadow, uptr size, in SetOriginIfPoisoned() 35 uptr dst_s = MEM_TO_SHADOW(addr); in SetOriginIfPoisoned() 36 uptr src_s = src_shadow; in SetOriginIfPoisoned() 37 uptr src_s_end = src_s + size; in SetOriginIfPoisoned() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/memprof/ |
H A D | memprof_allocator.h | 41 void OnMap(uptr p, uptr size) const; 42 void OnMapSecondary(uptr p, uptr size, uptr user_begin, in OnMapSecondary() 43 uptr user_size) const { in OnMapSecondary() 46 void OnUnmap(uptr p, uptr size) const; 49 constexpr uptr kAllocatorSpace = ~(uptr)0; 50 constexpr uptr kAllocatorSize = 0x40000000000ULL; // 4T. 54 static const uptr kSpaceBeg = kAllocatorSpace; 55 static const uptr kSpaceSize = kAllocatorSize; 56 static const uptr kMetadataSize = 0; 59 static const uptr kFlags = 0; [all …]
|