Home
last modified time | relevance | path

Searched refs:Shadow (Results 1 – 25 of 63) sorted by relevance

123

/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl/
H A Dtsan_rtl_access.cpp149 Shadow old, in DoReportRace()
158 StoreShadow(&shadow_mem[i], i == 0 ? Shadow::kRodata : Shadow::kEmpty); in DoReportRace()
187 if (old == Shadow::kRodata) in ContainsSameAccess()
200 Shadow old(LoadShadow(sp)); in CheckRaces()
390 if (raw == Shadow::kEmpty) { in DumpShadow()
394 Shadow s(raw); in DumpShadow()
460 Shadow cur(fast_state, 0, 8, typ); in MemoryAccess16()
516 Shadow cur(fast_state, 0, size2, typ); in UnalignedMemoryAccess()
540 static_cast<u32>(Shadow::kEmpty), static_cast<u32>(Shadow::kEmpty)); in ShadowSet()
701 if (*shadow_mem == Shadow::kRodata) in MemoryAccessRangeT()
[all …]
H A Dtsan_shadow.h41 friend class Shadow;
57 class Shadow {
61 Shadow(FastState state, u32 addr, u32 size, AccessType typ) { in Shadow() function
77 explicit Shadow(RawShadow x = Shadow::kEmpty) { raw_ = static_cast<u32>(x); }
85 DCHECK(part_.access_ != 0 || raw_ == static_cast<u32>(Shadow::kRodata)); in GetAccess()
136 Shadow s(fs, 0, 8, kAccessWrite); in FreedMarker()
141 Shadow s; in FreedInfo()
179 static_assert(sizeof(Shadow) == kShadowSize, "bad Shadow size");
H A Dtsan_rtl_report.cpp177 void ScopedReportBase::AddMemoryAccess(uptr addr, uptr external_tag, Shadow s, in AddMemoryAccess()
704 static bool SpuriousRace(Shadow old) { in SpuriousRace()
705 Shadow last(LoadShadow(&ctx->last_spurious_race)); in SpuriousRace()
709 void ReportRace(ThreadState *thr, RawShadow *shadow_mem, Shadow cur, Shadow old, in ReportRace()
733 Shadow s[kMop] = {cur, old}; in ReportRace()
H A Dtsan_rtl.h407 void AddMemoryAccess(uptr addr, uptr external_tag, Shadow s, Tid tid,
493 void ReportRace(ThreadState *thr, RawShadow *shadow_mem, Shadow cur, Shadow old,
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl-old/
H A Dtsan_shadow.h85 friend class Shadow;
103 class Shadow : public FastState {
105 explicit Shadow(u64 x) : FastState(x) {} in Shadow() function
107 explicit Shadow(const FastState &s) : FastState(s.x_) { ClearHistorySize(); } in Shadow() function
136 static inline bool TidsAreEqual(const Shadow s1, const Shadow s2) { in TidsAreEqual()
142 static ALWAYS_INLINE bool Addr0AndSizeAreEqual(const Shadow s1, in Addr0AndSizeAreEqual()
143 const Shadow s2) { in Addr0AndSizeAreEqual()
148 static ALWAYS_INLINE bool TwoRangesIntersect(Shadow s1, Shadow s2, in TwoRangesIntersect()
219 static bool TwoRangesIntersectSlow(const Shadow s1, const Shadow s2) { in TwoRangesIntersectSlow()
H A Dtsan_rtl_access.cpp140 Shadow LoadShadow(u64 *p) { in LoadShadow()
142 return Shadow(raw); in LoadShadow()
159 void HandleRace(ThreadState *thr, u64 *shadow_mem, Shadow cur, Shadow old) { in HandleRace()
193 Shadow old(0); in MemoryAccessImpl1()
265 Shadow cur(a); in ContainsSameAccessSlow()
383 Shadow cur(fast_state); in MemoryAccess()
493 Shadow s(thr->fast_state); in MemoryRangeFreed()
506 Shadow s(thr->fast_state); in MemoryRangeImitateWrite()
570 Shadow cur(fast_state); in MemoryAccessRange()
581 Shadow cur(fast_state); in MemoryAccessRange()
[all …]
H A Dtsan_update_shadow_word.inc27 if (LIKELY(Shadow::Addr0AndSizeAreEqual(cur, old))) {
29 if (LIKELY(Shadow::TidsAreEqual(old, cur))) {
48 if (Shadow::TwoRangesIntersect(old, cur, kAccessSize)) {
49 if (Shadow::TidsAreEqual(old, cur))
H A Dtsan_rtl_report.cpp177 void ScopedReportBase::AddMemoryAccess(uptr addr, uptr external_tag, Shadow s, in AddMemoryAccess()
812 Shadow s0(thr->racy_state[0]); in RaceBetweenAtomicAndFree()
813 Shadow s1(thr->racy_state[1]); in RaceBetweenAtomicAndFree()
838 Shadow s(thr->racy_state[1]); in ReportRace()
847 uptr a0 = addr + Shadow(thr->racy_state[0]).addr0(); in ReportRace()
848 uptr a1 = addr + Shadow(thr->racy_state[1]).addr0(); in ReportRace()
849 uptr e0 = a0 + Shadow(thr->racy_state[0]).size(); in ReportRace()
850 uptr e1 = a1 + Shadow(thr->racy_state[1]).size(); in ReportRace()
899 Shadow s2(thr->racy_state[1]); in ReportRace()
920 Shadow s(thr->racy_state[i]); in ReportRace()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/tsan/tests/unit/
H A Dtsan_shadow_test.cpp18 void CheckShadow(const Shadow *s, Sid sid, Epoch epoch, uptr addr, uptr size, in CheckShadow()
31 TEST(Shadow, Shadow) { in TEST() argument
45 Shadow s0(fs, 1, 2, kAccessWrite); in TEST()
47 Shadow s1(fs, 2, 3, kAccessRead); in TEST()
49 Shadow s2(fs, 0xfffff8 + 4, 1, kAccessWrite | kAccessAtomic); in TEST()
51 Shadow s3(fs, 0xfffff8 + 0, 8, kAccessRead | kAccessAtomic); in TEST()
80 Shadow sro(Shadow::kRodata); in TEST()
84 TEST(Shadow, Mapping) { in TEST() argument
99 TEST(Shadow, Celling) { in TEST() argument
177 TEST(Shadow, AllMappings) { ForEachMapping<MappingTest>(); } in TEST() argument
/llvm-project-15.0.7/llvm/lib/Transforms/Instrumentation/
H A DDataFlowSanitizer.cpp570 Value *Shadow; member
890 return Shadow; in expandFromPrimitiveShadowRecursive()
900 return Shadow; in expandFromPrimitiveShadowRecursive()
928 return Shadow; in expandFromPrimitiveShadow()
952 return Shadow; in collapseToPrimitiveShadow()
964 return Shadow; in collapseToPrimitiveShadow()
1686 if (!Shadow) { in getShadow()
1696 return Shadow; in getShadow()
1832 return CCS.Shadow; in combineShadows()
2236 Value *Shadow = in visitLoadInst() local
[all …]
H A DMemorySanitizer.cpp1055 Value *Shadow; member
1262 Value *Shadow = ShadowData.Shadow; in materializeChecks() local
1643 if (!Shadow) { in getShadow()
1648 return Shadow; in getShadow()
1776 assert(Shadow); in insertShadowCheck()
1798 if (!Shadow) return; in insertShadowCheck()
2127 if (!Shadow) in Add()
2131 Shadow = IRB.CreateOr(Shadow, OpShadow, "_msprop"); in Add()
2164 assert(Shadow); in Done()
2165 Shadow = MSV->CreateShadowCast(IRB, Shadow, MSV->getShadowTy(I)); in Done()
[all …]
H A DMemProfiler.cpp186 Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
300 Value *MemProfiler::memToShadow(Value *Shadow, IRBuilder<> &IRB) { in memToShadow() argument
302 Shadow = IRB.CreateAnd(Shadow, Mapping.Mask); in memToShadow()
303 Shadow = IRB.CreateLShr(Shadow, Mapping.Scale); in memToShadow()
306 return IRB.CreateAdd(Shadow, DynamicShadowOffset); in memToShadow()
H A DHWAddressSanitizer.cpp294 Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
806 Value *Shadow = IRB.CreateLShr(Mem, Mapping.Scale); in memToShadow() local
808 return IRB.CreateIntToPtr(Shadow, Int8PtrTy); in memToShadow()
810 return IRB.CreateGEP(Int8Ty, ShadowBase, Shadow); in memToShadow()
849 Value *Shadow = memToShadow(AddrLong, IRB); in instrumentMemAccessInline() local
850 Value *MemTag = IRB.CreateLoad(Int8Ty, Shadow); in instrumentMemAccessInline()
/llvm-project-15.0.7/llvm/unittests/ADT/
H A DIteratorTest.cpp20 template <int> struct Shadow;
22 struct WeirdIter : std::iterator<std::input_iterator_tag, Shadow<0>, Shadow<1>,
23 Shadow<2>, Shadow<3>> {};
29 static_assert(std::is_same<typename AdaptedIter::value_type, Shadow<0>>::value,
32 std::is_same<typename AdaptedIter::difference_type, Shadow<1>>::value, "");
33 static_assert(std::is_same<typename AdaptedIter::pointer, Shadow<2>>::value,
35 static_assert(std::is_same<typename AdaptedIter::reference, Shadow<3>>::value,
/llvm-project-15.0.7/llvm/test/Instrumentation/AddressSanitizer/
H A Dforce-dynamic-shadow.ll16 ; Shadow address is loaded and added into the whole offset computation.
H A Dbasic-msvc64.ll15 ; Shadow address is loaded and added into the whole offset computation.
H A Ddynamic-shadow-darwin.ll24 ; Shadow address is loaded and added into the whole offset computation.
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A DQualityTests.cpp143 auto *Shadow = in TEST() local
151 CodeCompletionResult Result(Shadow->getTargetDecl(), 42); in TEST()
152 Result.ShadowDecl = Shadow; in TEST()
/llvm-project-15.0.7/llvm/test/Instrumentation/MemorySanitizer/
H A Dcheck_access_address.ll42 ; Shadow calculations must happen after the check.
/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DIncludeCleaner.cpp131 for (const auto *Shadow : D->shadows()) in VisitUsingDecl() local
132 add(Shadow->getTargetDecl()); in VisitUsingDecl()
/llvm-project-15.0.7/llvm/test/CodeGen/RISCV/
H A DO0-pipeline.ll25 ; CHECK-NEXT: Shadow Stack GC Lowering
/llvm-project-15.0.7/llvm/test/CodeGen/X86/
H A Dshadow-stack.ll30 ; Functions that use LongJmp should fix the Shadow Stack using previosuly saved
110 ; future fixing of the Shadow Stack.
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DRenamerClangTidyCheck.cpp353 for (const auto *Shadow : Decl->shadows()) in check() local
354 addUsage(Shadow->getTargetDecl(), Decl->getNameInfo().getSourceRange(), in check()
/llvm-project-15.0.7/llvm/test/CodeGen/AArch64/
H A DO0-pipeline.ll21 ; CHECK-NEXT: Shadow Stack GC Lowering
/llvm-project-15.0.7/clang/lib/AST/
H A DDeclCXX.cpp1340 if (auto *Shadow = dyn_cast<UsingShadowDecl>(D)) { in addedMember() local
1341 if (Shadow->getDeclName().getNameKind() in addedMember()
1344 data().Conversions.get(Ctx).addDecl(Ctx, Shadow, Shadow->getAccess()); in addedMember()
3009 const UsingShadowDecl *Shadow = this; in getIntroducer() local
3011 dyn_cast<UsingShadowDecl>(Shadow->UsingOrNextShadow)) in getIntroducer()
3012 Shadow = NextShadow; in getIntroducer()
3013 return cast<BaseUsingDecl>(Shadow->UsingOrNextShadow); in getIntroducer()

123