| /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 kMidAppMemEnd = 0x5a0000000000ull; [all …]
|
| H A D | tsan_rtl.h | 65 static const uptr kSpaceBeg = SANITIZER_MMAP_BEGIN; 67 static const uptr kMetadataSize = 0; 69 static const uptr kRegionSizeLog = 20; 72 static const uptr kFlags = 0; 82 static const uptr kSpaceBeg = Mapping::kHeapMemBeg; 83 static const uptr kSpaceSize = Mapping::kHeapMemEnd - Mapping::kHeapMemBeg; 84 static const uptr kMetadataSize = 0; 87 static const uptr kFlags = 0; 100 uptr sp; 103 uptr oldset_stack_size; [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 …]
|
| H A D | asan_report.h | 24 uptr beg; 25 uptr size; 27 uptr name_len; 28 uptr line; 33 int GetGlobalsForAddress(uptr addr, __asan_global *globals, u32 *reg_sites, 50 void ReportGenericError(uptr pc, uptr bp, uptr sp, uptr addr, bool is_write, 51 uptr access_size, u32 exp, bool fatal); 53 void ReportNewDeleteTypeMismatch(uptr addr, uptr delete_size, 54 uptr delete_alignment, 56 void ReportDoubleFree(uptr addr, BufferedStackTrace *free_stack); [all …]
|
| H A D | asan_poisoning.cpp | 48 bool FindPoisonRecord(uptr addr, PoisonRecord &match) { in FindPoisonRecord() 83 void PoisonShadow(uptr addr, uptr size, u8 value) { in PoisonShadow() 93 void PoisonShadowPartialRightRedzone(uptr addr, in PoisonShadowPartialRightRedzone() 94 uptr size, in PoisonShadowPartialRightRedzone() 95 uptr redzone_size, in PoisonShadowPartialRightRedzone() 108 explicit ShadowSegmentEndpoint(uptr address) { in ShadowSegmentEndpoint() 115 void AsanPoisonOrUnpoisonIntraObjectRedzone(uptr ptr, uptr size, bool poison) { in AsanPoisonOrUnpoisonIntraObjectRedzone() 116 uptr end = ptr + size; in AsanPoisonOrUnpoisonIntraObjectRedzone() 151 void __asan_poison_memory_region(void const volatile *addr, uptr size) { in __asan_poison_memory_region() 153 uptr beg_addr = (uptr)addr; in __asan_poison_memory_region() [all …]
|
| H A D | asan_allocator.h | 59 uptr Beg() const; // First byte of user memory. 60 uptr End() const; // Last byte of user memory. 61 uptr UsedSize() const; // Size requested by the user. 63 uptr AllocTid() const; 64 uptr FreeTid() const; 69 bool AddrIsInside(uptr addr, uptr access_size, sptr *offset) const { in AddrIsInside() 76 bool AddrIsAtLeft(uptr addr, uptr access_size, sptr *offset) const { in AddrIsAtLeft() 84 bool AddrIsAtRight(uptr addr, uptr access_size, sptr *offset) const { in AddrIsAtRight() 96 AsanChunkView FindHeapChunkByAddress(uptr address); 97 AsanChunkView FindHeapChunkByAllocBeg(uptr address); [all …]
|
| H A D | asan_fake_stack.cpp | 29 ALWAYS_INLINE void SetShadow(uptr ptr, uptr size, uptr class_id, u64 magic) { in SetShadow() 34 for (uptr i = 0; i < (((uptr)1) << class_id); i++) { in SetShadow() 45 uptr redzone_size = FakeStack::BytesInSizeClass(class_id) - size; in SetShadow() 50 FakeStack *FakeStack::Create(uptr stack_size_log) { in Create() 51 static uptr kMinStackSizeLog = 16; in Create() 52 static uptr kMaxStackSizeLog = FIRST_32_SECOND_64(24, 28); in Create() 57 uptr size = RequiredSize(stack_size_log); in Create() 76 for (uptr class_id = 0; class_id < kNumberOfSizeClasses; class_id++) in Destroy() 81 uptr size = RequiredSize(stack_size_log_); in Destroy() 82 FlushUnneededASanShadowMemory(reinterpret_cast<uptr>(this), size); in Destroy() [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 getReleasedBytes() const { return ReleasedBytes; } in getReleasedBytes() 27 uptr getBase() const { return Base; } in getBase() 31 void releasePageRangeToOS(uptr From, uptr To) { in releasePageRangeToOS() 32 const uptr Size = To - From; in releasePageRangeToOS() 38 uptr ReleasedBytes = 0; 40 uptr Base = 0; 43 uptr Offset = 0; 48 ReleaseRecorder(uptr Base, uptr Offset = 0, MapPlatformData *Data = nullptr) 51 uptr getReleasedBytes() const { return ReleasedBytes; } in getReleasedBytes() [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; 153 inline uptr selectRandomTag(uptr Ptr, uptr ExcludeMask) { in selectRandomTag() 155 uptr TaggedPtr; in selectRandomTag() 166 inline uptr addFixedTag(uptr Ptr, uptr Tag) { in addFixedTag() [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_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_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_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); 32 uptr internal_close_range(fd_t lowfd, fd_t highfd, int flags); 34 uptr internal_close(fd_t fd); 36 uptr internal_read(fd_t fd, void *buf, uptr count); 37 uptr internal_write(fd_t fd, const void *buf, uptr count); 40 uptr internal_mmap(void *addr, uptr length, int prot, int flags, 42 uptr internal_munmap(void *addr, uptr length); 44 uptr internal_mremap(void *old_address, uptr old_size, uptr new_size, int flags, 47 int internal_mprotect(void *addr, uptr length, int prot); [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 …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/lsan/ |
| 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 padding : 22; 56 static const uptr kSpaceBeg = SANITIZER_MMAP_BEGIN; 58 static const uptr kMetadataSize = sizeof(ChunkMetadata); [all …]
|
| 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); 129 void GetAllocatorGlobalRange(uptr *begin, uptr *end); 132 uptr PointsIntoChunk(void *p); 134 uptr GetUserBegin(uptr chunk); 137 uptr GetUserAddr(uptr chunk); [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/msan/ |
| H A D | msan_allocator.cpp | 31 uptr requested_size; 35 void OnMap(uptr p, uptr size) const {} in OnMap() 36 void OnMapSecondary(uptr p, uptr size, uptr user_begin, in OnMapSecondary() 37 uptr user_size) const {} in OnMapSecondary() 38 void OnUnmap(uptr p, uptr size) const { in OnUnmap() 43 uptr shadow_p = MEM_TO_SHADOW(p); in OnUnmap() 46 uptr origin_p = MEM_TO_ORIGIN(p); in OnUnmap() 56 const uptr kMaxAllowedMallocSize = 2UL << 30; 59 static const uptr kSpaceBeg = SANITIZER_MMAP_BEGIN; 61 static const uptr kMetadataSize = sizeof(Metadata); [all …]
|