| /llvm-project-15.0.7/compiler-rt/lib/asan/ |
| H A D | asan_poisoning.cpp | 119 *beg.chunk = Min(value, beg.offset); in __asan_poison_memory_region() 130 *beg.chunk = beg.offset; in __asan_poison_memory_region() 132 *beg.chunk = Min(beg.value, beg.offset); in __asan_poison_memory_region() 134 beg.chunk++; in __asan_poison_memory_region() 164 *beg.chunk = 0; in __asan_unpoison_memory_region() 165 beg.chunk++; in __asan_unpoison_memory_region() 167 REAL(memset)(beg.chunk, 0, end.chunk - beg.chunk); in __asan_unpoison_memory_region() 182 return beg; in __asan_region_is_poisoned() 185 CHECK_LT(beg, end); in __asan_region_is_poisoned() 200 for (; beg < end; beg++) in __asan_region_is_poisoned() [all …]
|
| H A D | asan_globals.cpp | 165 if (g->beg == l->g->beg && in CheckODRViolationViaPoisoning() 202 CHECK(AddrIsInMem(g->beg)); in RegisterGlobal() 203 if (!AddrIsAlignedByGranularity(g->beg)) { in RegisterGlobal() 211 CHECK(AddrIsAlignedByGranularity(g->beg)); in RegisterGlobal() 243 CHECK(AddrIsInMem(g->beg)); in UnregisterGlobal() 244 CHECK(AddrIsAlignedByGranularity(g->beg)); in UnregisterGlobal() 290 for (uptr p = g.beg; p < g.beg + g.size - 1; p++) { in PrintGlobalNameIfASCII() 294 if (*(char *)(g.beg + g.size - 1) != '\0') return; in PrintGlobalNameIfASCII() 296 (char *)g.beg); in PrintGlobalNameIfASCII() 372 if (SANITIZER_WINDOWS && globals[i].beg == 0) { in __asan_register_globals() [all …]
|
| H A D | asan_interceptors_memintrinsics.h | 28 static inline bool QuickCheckForUnpoisonedRegion(uptr beg, uptr size) { in DECLARE_REAL() 31 return !AddressIsPoisoned(beg) && in DECLARE_REAL() 32 !AddressIsPoisoned(beg + size - 1) && in DECLARE_REAL() 33 !AddressIsPoisoned(beg + size / 2); in DECLARE_REAL() 35 return !AddressIsPoisoned(beg) && in DECLARE_REAL() 36 !AddressIsPoisoned(beg + size / 4) && in DECLARE_REAL() 37 !AddressIsPoisoned(beg + size - 1) && in DECLARE_REAL() 38 !AddressIsPoisoned(beg + 3 * size / 4) && in DECLARE_REAL() 39 !AddressIsPoisoned(beg + size / 2); in DECLARE_REAL()
|
| H A D | asan_descriptions.cpp | 226 uptr var_end = var.beg + var.size; in PrintAccessAndVarIntersection() 231 if (addr >= var.beg) { in PrintAccessAndVarIntersection() 240 if (addr_end > var.beg) in PrintAccessAndVarIntersection() 246 str.append(" [%zd, %zd)", var.beg, var_end); in PrintAccessAndVarIntersection() 281 if (addr < g.beg) { in DescribeAddressRelativeToGlobal() 283 g.beg - addr); in DescribeAddressRelativeToGlobal() 285 if (addr < g.beg + g.size) addr = g.beg + g.size; in DescribeAddressRelativeToGlobal() 287 addr - (g.beg + g.size)); in DescribeAddressRelativeToGlobal() 345 if (a.beg == b.beg && in PointsInsideTheSameVariable() 346 a.beg <= addr && in PointsInsideTheSameVariable() [all …]
|
| /llvm-project-15.0.7/compiler-rt/test/asan/TestCases/ |
| H A D | contiguous_container.cpp | 12 char *beg = new char[capacity]; in TestContainer() local 13 char *end = beg + capacity; in TestContainer() 14 char *mid = beg + capacity; in TestContainer() 21 mid = beg + size; in TestContainer() 25 assert(!__asan_address_is_poisoned(beg + idx)); in TestContainer() 27 assert(__asan_address_is_poisoned(beg + idx)); in TestContainer() 31 if (mid != beg) { in TestContainer() 34 beg, mid - 1, end)); in TestContainer() 39 beg, mid + 1, end)); in TestContainer() 46 assert(!__asan_address_is_poisoned(beg + idx)); in TestContainer() [all …]
|
| /llvm-project-15.0.7/compiler-rt/lib/msan/ |
| H A D | msan_poisoning.cpp | 48 uptr beg = d & ~3UL; in CopyOrigin() local 50 if (beg < d) { in CopyOrigin() 56 beg += 4; in CopyOrigin() 61 if (end < beg) return; in CopyOrigin() 72 if (beg < end) { in CopyOrigin() 116 uptr beg = d & ~3UL; in ReverseCopyOrigin() local 118 if (beg + 4 < end) { in ReverseCopyOrigin() 139 ((void *)MEM_TO_ORIGIN(beg), (void *)MEM_TO_ORIGIN(s), end - beg - 4); in ReverseCopyOrigin() 144 if (beg < d) { in ReverseCopyOrigin() 233 if (beg & 7ULL) { in SetOrigin() [all …]
|
| H A D | msan_linux.cpp | 37 void ReportMapRange(const char *descr, uptr beg, uptr size) { in ReportMapRange() argument 39 uptr end = beg + size - 1; in ReportMapRange() 40 VPrintf(1, "%s : 0x%zx - 0x%zx\n", descr, beg, end); in ReportMapRange() 46 uptr end = beg + size - 1; in CheckMemoryRangeAvailability() 47 if (!MemoryRangeIsAvailable(beg, end)) { in CheckMemoryRangeAvailability() 57 void *addr = MmapFixedNoAccess(beg, size, name); in ProtectMemoryRange() 58 if (beg == 0 && addr) { in ProtectMemoryRange() 62 beg += gap; in ProtectMemoryRange() 64 addr = MmapFixedNoAccess(beg, size, name); in ProtectMemoryRange() 66 if ((uptr)addr != beg) { in ProtectMemoryRange() [all …]
|
| /llvm-project-15.0.7/compiler-rt/lib/tsan/rtl-old/ |
| H A D | tsan_platform_posix.cpp | 82 static bool TryProtectRange(uptr beg, uptr end) { in TryProtectRange() argument 83 CHECK_LE(beg, end); in TryProtectRange() 84 if (beg == end) in TryProtectRange() 86 return beg == (uptr)MmapFixedNoAccess(beg, end - beg); in TryProtectRange() 89 static void ProtectRange(uptr beg, uptr end) { in ProtectRange() argument 90 if (!TryProtectRange(beg, end)) { in ProtectRange() 91 Printf("FATAL: ThreadSanitizer can not protect [%zx,%zx]\n", beg, end); in ProtectRange()
|
| /llvm-project-15.0.7/compiler-rt/lib/tsan/rtl/ |
| H A D | tsan_platform_posix.cpp | 82 static bool TryProtectRange(uptr beg, uptr end) { in TryProtectRange() argument 83 CHECK_LE(beg, end); in TryProtectRange() 84 if (beg == end) in TryProtectRange() 86 return beg == (uptr)MmapFixedNoAccess(beg, end - beg); in TryProtectRange() 89 static void ProtectRange(uptr beg, uptr end) { in ProtectRange() argument 90 if (!TryProtectRange(beg, end)) { in ProtectRange() 91 Printf("FATAL: ThreadSanitizer can not protect [%zx,%zx]\n", beg, end); in ProtectRange()
|
| /llvm-project-15.0.7/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/ |
| H A D | seekoff.pass.cpp | 26 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1); in main() 32 assert(sb.pubseekoff(0, std::ios_base::beg, std::ios_base::in) == 0); in main() 38 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == -1); in main() 44 assert(sb.pubseekoff(0, std::ios_base::beg, std::ios_base::out) == 0); in main() 50 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1); in main() 56 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3); in main() 65 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == -1); in main() 71 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == 3); in main() 83 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3); in main() 117 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3); in main() [all …]
|
| /llvm-project-15.0.7/compiler-rt/lib/dfsan/ |
| H A D | dfsan.cpp | 250 if (beg < d) { in CopyOrigin() 251 ChainAndWriteOriginIfTainted((uptr)src, beg + kOriginAlign - d, beg, stack); in CopyOrigin() 252 beg += kOriginAlign; in CopyOrigin() 257 if (end < beg) in CopyOrigin() 265 if (beg >= end) in CopyOrigin() 324 if (beg < d) in ReverseCopyOrigin() 368 if (beg & 7ULL) { in SetOrigin() 371 beg += 4; in SetOrigin() 466 if (!mem_is_zero((const char *)beg, end - beg)) in WriteZeroShadowInRange() 467 internal_memset((void *)beg, 0, end - beg); in WriteZeroShadowInRange() [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/input.output/iostream.format/output.streams/ostream.seeks/ |
| H A D | seekp2.pass.cpp | 37 assert(way == std::ios_base::beg); in seekoff() 48 assert(&os.seekp(5, std::ios_base::beg) == &os); in main() 55 assert(&os.seekp(10, std::ios_base::beg) == &os); in main() 58 assert(&os.seekp(-1, std::ios_base::beg) == &os); in main() 67 assert(&os.seekp(10, std::ios_base::beg) == &os); in main()
|
| /llvm-project-15.0.7/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/ |
| H A D | seekoff.pass.cpp | 26 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1); in main() 29 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in | std::ios_base::out) == -1); in main() 32 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3); in main() 42 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3); in main() 45 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out | std::ios_base::in) == 3); in main() 48 assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == 3); in main()
|
| /llvm-project-15.0.7/compiler-rt/test/asan/TestCases/Posix/ |
| H A D | gc-test.cpp | 24 void *beg, *end; in Thread() local 26 __asan_addr_is_in_fake_stack(fake_stack, &var[0], &beg, &end); in Thread() 28 assert((char*)beg <= (char*)&var[0]); in Thread() 36 assert(beg == beg1); in Thread()
|
| /llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_common_libcdep.cpp | 158 void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name, in ReserveShadowMemoryRange() argument 160 CHECK_EQ((beg % GetMmapGranularity()), 0); in ReserveShadowMemoryRange() 162 uptr size = end - beg + 1; in ReserveShadowMemoryRange() 164 if (madvise_shadow ? !MmapFixedSuperNoReserve(beg, size, name) in ReserveShadowMemoryRange() 165 : !MmapFixedNoReserve(beg, size, name)) { in ReserveShadowMemoryRange() 173 DontDumpShadowMemory(beg, size); in ReserveShadowMemoryRange()
|
| H A D | sanitizer_allocator_secondary.h | 230 uptr beg = 0, end = n - 1; in GetBlockBeginFastLocked() local 233 while (end - beg >= 2) { in GetBlockBeginFastLocked() 234 uptr mid = (beg + end) / 2; // Invariant: mid >= beg + 1 in GetBlockBeginFastLocked() 238 beg = mid; // chunks[mid] may still be what we want. in GetBlockBeginFastLocked() 241 if (beg < end) { in GetBlockBeginFastLocked() 242 CHECK_EQ(beg + 1, end); in GetBlockBeginFastLocked() 245 beg = end; in GetBlockBeginFastLocked() 248 const Header *h = AddressSpaceView::Load(chunks[beg]); in GetBlockBeginFastLocked() 249 Header *h_ptr = chunks[beg]; in GetBlockBeginFastLocked()
|
| H A D | sanitizer_allocator_primary64.h | 266 uptr beg = chunk_idx * size; in GetBlockBegin() local 267 uptr next_beg = beg + size; in GetBlockBegin() 270 return reinterpret_cast<void*>(reg_beg + beg); in GetBlockBegin() 711 return beg >= NonConstSpaceBeg && in MapWithCallback() 716 CHECK_EQ(beg, mapped); in MapWithCallback() 717 MapUnmapCallback().OnMap(beg, size); in MapWithCallback() 723 CHECK_GE(beg, NonConstSpaceBeg); in MapWithCallbackOrDie() 727 CHECK_EQ(beg, address_range.MapOrDie(beg, size, name)); in MapWithCallbackOrDie() 728 MapUnmapCallback().OnMap(beg, size); in MapWithCallbackOrDie() 734 MapUnmapCallback().OnUnmap(beg, size); in UnmapWithCallbackOrDie() [all …]
|
| H A D | sanitizer_allocator_primary32.h | 146 void UnmapWithCallback(uptr beg, uptr size) { in UnmapWithCallback() argument 147 MapUnmapCallback().OnUnmap(beg, size); in UnmapWithCallback() 148 UnmapOrDie(reinterpret_cast<void *>(beg), size); in UnmapWithCallback() 160 uptr beg = ComputeRegionBeg(mem); in GetMetaData() local 162 u32 offset = mem - beg; in GetMetaData() 164 uptr meta = (beg + kRegionSize) - (n + 1) * kMetadataSize; in GetMetaData() 209 uptr beg = ComputeRegionBeg(mem); in GetBlockBegin() local 211 u32 offset = mem - beg; in GetBlockBegin() 213 uptr res = beg + (n * (u32)size); in GetBlockBegin()
|
| H A D | sanitizer_coverage_libcdep_new.cpp | 191 static void Cov8bitCountersInit(char* beg, char* end) { in Cov8bitCountersInit() argument 192 counters_beg = beg; in Cov8bitCountersInit() 197 static void CovPcsInit(const uptr* beg, const uptr* end) { in CovPcsInit() argument 198 pcs_beg = beg; in CovPcsInit() 277 SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_pcs_init, const uptr* beg, in SANITIZER_INTERFACE_WEAK_DEF() argument 279 __sancov::SingletonCounterCoverage::CovPcsInit(beg, end); in SANITIZER_INTERFACE_WEAK_DEF()
|
| H A D | sanitizer_libignore.cpp | 84 ignored_code_ranges_[idx].begin = range.beg; in OnLibraryLoaded() 106 if (IsPcInstrumented(range.beg) && IsPcInstrumented(range.end - 1)) in OnLibraryLoaded() 109 range.beg, range.end, mod.full_name()); in OnLibraryLoaded() 113 instrumented_code_ranges_[idx].begin = range.beg; in OnLibraryLoaded()
|
| /llvm-project-15.0.7/compiler-rt/lib/asan/tests/ |
| H A D | asan_interface_test.cpp | 329 for (size_t beg = 0; beg < size + rz; beg++) { in TEST() local 330 for (size_t end = beg; end < size + rz; end++) { in TEST() 331 void *first_poisoned = __asan_region_is_poisoned(p + beg, end - beg); in TEST() 332 if (beg == end) { in TEST() 334 } else if (beg < size && end <= size) { in TEST() 336 } else if (beg >= size) { in TEST() 337 EXPECT_EQ(p + beg, first_poisoned); in TEST()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-include-fixer/tool/ |
| H A D | clang-include-fixer.el | 401 (let ((beg (car bounds)) 406 (goto-char beg) 411 (setq beg (point)) 418 (buffer-substring-no-properties beg end))))) 434 (let ((beg (- (point) 2))) 435 (when (and (>= beg (point-min)) 436 (string-equal (buffer-substring-no-properties beg (point)) "::")) 437 (goto-char beg)
|
| /llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/tests/ |
| H A D | sanitizer_libc_test.cpp | 47 for (size_t beg = 0; beg < size; beg++) { in TEST() local 48 for (size_t end = beg; end < size; end++) { in TEST() 50 if (beg <= pos && pos < end) in TEST() 51 EXPECT_FALSE(__sanitizer::mem_is_zero(x + beg, end - beg)); in TEST() 53 EXPECT_TRUE(__sanitizer::mem_is_zero(x + beg, end - beg)); in TEST()
|
| /llvm-project-15.0.7/compiler-rt/lib/tsan/tests/unit/ |
| H A D | tsan_shadow_test.cpp | 141 static void TestRegion(uptr beg, uptr end) { in TestRegion() 142 if (beg == end) in TestRegion() 144 Printf("checking region [0x%zx-0x%zx)\n", beg, end); in TestRegion() 146 for (uptr p0 = beg; p0 <= end; p0 += (end - beg) / 256) { in TestRegion() 149 if (p < beg || p >= end) in TestRegion()
|
| /llvm-project-15.0.7/lldb/source/Plugins/SymbolFile/DWARF/ |
| H A D | DWARFAttribute.cpp | 21 collection::const_iterator beg = m_infos.begin(); in FindAttributeIndex() local 23 for (pos = beg; pos != end; ++pos) { in FindAttributeIndex() 25 return std::distance(beg, pos); in FindAttributeIndex()
|