| /freebsd-12-stable/contrib/llvm-project/compiler-rt/lib/fuzzer/ |
| D | FuzzerMutate.cpp | 70 size_t MutationDispatcher::Mutate_Custom(uint8_t *Data, size_t Size, in Mutate_Custom() argument 73 EF->__msan_unpoison(Data, Size); in Mutate_Custom() 76 return EF->LLVMFuzzerCustomMutator(Data, Size, MaxSize, in Mutate_Custom() 80 size_t MutationDispatcher::Mutate_CustomCrossOver(uint8_t *Data, size_t Size, in Mutate_CustomCrossOver() argument 82 if (Size == 0) in Mutate_CustomCrossOver() 92 EF->__msan_unpoison(Data, Size); in Mutate_CustomCrossOver() 99 Data, Size, Other.data(), Other.size(), U.data(), U.size(), in Mutate_CustomCrossOver() 109 size_t MutationDispatcher::Mutate_ShuffleBytes(uint8_t *Data, size_t Size, in Mutate_ShuffleBytes() argument 111 if (Size > MaxSize || Size == 0) return 0; in Mutate_ShuffleBytes() 113 Rand(std::min(Size, (size_t)8)) + 1; // [1,8] and <= Size. in Mutate_ShuffleBytes() [all …]
|
| D | FuzzerMutate.h | 35 size_t Mutate_Custom(uint8_t *Data, size_t Size, size_t MaxSize); 37 size_t Mutate_CustomCrossOver(uint8_t *Data, size_t Size, size_t MaxSize); 39 size_t Mutate_ShuffleBytes(uint8_t *Data, size_t Size, size_t MaxSize); 41 size_t Mutate_EraseBytes(uint8_t *Data, size_t Size, size_t MaxSize); 43 size_t Mutate_InsertByte(uint8_t *Data, size_t Size, size_t MaxSize); 45 size_t Mutate_InsertRepeatedBytes(uint8_t *Data, size_t Size, size_t MaxSize); 47 size_t Mutate_ChangeByte(uint8_t *Data, size_t Size, size_t MaxSize); 49 size_t Mutate_ChangeBit(uint8_t *Data, size_t Size, size_t MaxSize); 51 size_t Mutate_CopyPart(uint8_t *Data, size_t Size, size_t MaxSize); 54 size_t Mutate_AddWordFromManualDictionary(uint8_t *Data, size_t Size, [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/BinaryFormat/ |
| D | MsgPackWriter.cpp | 102 size_t Size = s.size(); in write() local 104 if (Size <= FixMax::String) in write() 105 EW.write(static_cast<uint8_t>(FixBits::String | Size)); in write() 106 else if (!Compatible && Size <= UINT8_MAX) { in write() 108 EW.write(static_cast<uint8_t>(Size)); in write() 109 } else if (Size <= UINT16_MAX) { in write() 111 EW.write(static_cast<uint16_t>(Size)); in write() 113 assert(Size <= UINT32_MAX && "String object too long to be encoded"); in write() 115 EW.write(static_cast<uint32_t>(Size)); in write() 124 size_t Size = Buffer.getBufferSize(); in write() local [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/WebAssembly/Disassembler/ |
| D | WebAssemblyDisassembler.cpp | 45 DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, 48 Optional<DecodeStatus> onSymbolStart(SymbolInfoTy &Symbol, uint64_t &Size, 76 static int nextByte(ArrayRef<uint8_t> Bytes, uint64_t &Size) { in nextByte() argument 77 if (Size >= Bytes.size()) in nextByte() 79 auto V = Bytes[Size]; in nextByte() 80 Size++; in nextByte() 84 static bool nextLEB(int64_t &Val, ArrayRef<uint8_t> Bytes, uint64_t &Size, in nextLEB() argument 88 Val = Signed ? decodeSLEB128(Bytes.data() + Size, &N, in nextLEB() 90 : static_cast<int64_t>(decodeULEB128(Bytes.data() + Size, &N, in nextLEB() 95 Size += N; in nextLEB() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/compiler-rt/lib/orc/ |
| D | c_api.h | 75 size_t Size; member 86 R->Size = 0; in __orc_rt_CWrapperFunctionResultInit() 96 size_t Size) { in __orc_rt_CWrapperFunctionResultAllocate() argument 97 R->Size = Size; in __orc_rt_CWrapperFunctionResultAllocate() 98 if (Size <= sizeof(R->Data.Value)) in __orc_rt_CWrapperFunctionResultAllocate() 101 R->Data.ValuePtr = (char *)malloc(Size); in __orc_rt_CWrapperFunctionResultAllocate() 109 __orc_rt_CreateCWrapperFunctionResultFromRange(const char *Data, size_t Size) { in __orc_rt_CreateCWrapperFunctionResultFromRange() argument 111 R.Size = Size; in __orc_rt_CreateCWrapperFunctionResultFromRange() 112 if (R.Size > sizeof(R.Data.Value)) { in __orc_rt_CreateCWrapperFunctionResultFromRange() 113 char *Tmp = (char *)malloc(Size); in __orc_rt_CreateCWrapperFunctionResultFromRange() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/compiler-rt/lib/gwp_asan/platform_specific/ |
| D | guarded_pool_allocator_posix.cpp | 29 void MaybeSetMappingName(void *Mapping, size_t Size, const char *Name) { in MaybeSetMappingName() argument 31 prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, Mapping, Size, Name); in MaybeSetMappingName() 45 void *GuardedPoolAllocator::map(size_t Size, const char *Name) const { in map() argument 46 assert((Size % State.PageSize) == 0); in map() 47 void *Ptr = mmap(nullptr, Size, PROT_READ | PROT_WRITE, in map() 50 MaybeSetMappingName(Ptr, Size, Name); in map() 54 void GuardedPoolAllocator::unmap(void *Ptr, size_t Size) const { in unmap() 56 assert((Size % State.PageSize) == 0); in unmap() 57 Check(munmap(Ptr, Size) == 0, in unmap() 61 void *GuardedPoolAllocator::reserveGuardedPool(size_t Size) { in reserveGuardedPool() argument [all …]
|
| D | guarded_pool_allocator_fuchsia.cpp | 23 void *GuardedPoolAllocator::map(size_t Size, const char *Name) const { in map() argument 24 assert((Size % State.PageSize) == 0); in map() 26 zx_status_t Status = _zx_vmo_create(Size, 0, &Vmo); in map() 32 0, Vmo, 0, Size, &Addr); in map() 38 void GuardedPoolAllocator::unmap(void *Ptr, size_t Size) const { in unmap() 40 assert((Size % State.PageSize) == 0); in unmap() 42 reinterpret_cast<zx_vaddr_t>(Ptr), Size); in unmap() 46 void *GuardedPoolAllocator::reserveGuardedPool(size_t Size) { in reserveGuardedPool() argument 47 assert((Size % State.PageSize) == 0); in reserveGuardedPool() 52 Size, &GuardedPagePoolPlatformData.Vmar, &Addr); in reserveGuardedPool() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
| D | quarantine.h | 23 uptr Size; member 27 void init(void *Ptr, uptr Size) { in init() 30 this->Size = Size + sizeof(QuarantineBatch); // Account for the Batch Size. in init() 34 uptr getQuarantinedSize() const { return Size - sizeof(QuarantineBatch); } in getQuarantinedSize() 36 void push_back(void *Ptr, uptr Size) { in push_back() 39 this->Size += Size; in push_back() 48 DCHECK_GE(Size, sizeof(QuarantineBatch)); in merge() 53 Size += From->getQuarantinedSize(); in merge() 56 From->Size = sizeof(QuarantineBatch); in merge() 67 void init() { DCHECK_EQ(atomic_load_relaxed(&Size), 0U); } in init() [all …]
|
| D | vector.h | 32 DCHECK_LT(I, Size); 36 DCHECK_LT(I, Size); 40 DCHECK_LE(Size, capacity()); in push_back() 41 if (Size == capacity()) { in push_back() 42 const uptr NewCapacity = roundUpToPowerOfTwo(Size + 1); in push_back() 45 memcpy(&Data[Size++], &Element, sizeof(T)); in push_back() 48 DCHECK_GT(Size, 0); in back() 49 return Data[Size - 1]; in back() 52 DCHECK_GT(Size, 0); in pop_back() 53 Size--; in pop_back() [all …]
|
| D | size_class_map.h | 18 inline uptr scaledLog2(uptr Size, uptr ZeroLog, uptr LogBits) { in scaledLog2() argument 19 const uptr L = getMostSignificantSetBitIndex(Size); in scaledLog2() 20 const uptr LBits = (Size >> (L - LogBits)) - (1 << LogBits); in scaledLog2() 26 static u32 getMaxCachedHint(uptr Size) { in getMaxCachedHint() 27 DCHECK_NE(Size, 0); in getMaxCachedHint() 31 N = static_cast<u32>((1UL << Config::MaxBytesCachedLog) / Size); in getMaxCachedHint() 33 N = (1U << Config::MaxBytesCachedLog) / static_cast<u32>(Size); in getMaxCachedHint() 92 static uptr getClassIdBySize(uptr Size) { in getClassIdBySize() argument 93 if (Size <= Config::SizeDelta + (1 << Config::MinSizeLog)) in getClassIdBySize() 95 Size -= Config::SizeDelta; in getClassIdBySize() [all …]
|
| D | fuchsia.cpp | 33 static void *allocateVmar(uptr Size, MapPlatformData *Data, bool AllowNoMem) { in allocateVmar() argument 41 Size, &Data->Vmar, &Data->VmarBase); in allocateVmar() 44 dieOnMapUnmapError(Status == ZX_ERR_NO_MEMORY ? Size : 0); in allocateVmar() 50 void *map(void *Addr, uptr Size, const char *Name, uptr Flags, in map() argument 52 DCHECK_EQ(Size % getPageSizeCached(), 0); in map() 57 return allocateVmar(Size, Data, AllowNoMem); in map() 71 Status = _zx_vmo_set_size(Vmo, VmoSize + Size); in map() 74 dieOnMapUnmapError(Status == ZX_ERR_NO_MEMORY ? Size : 0); in map() 79 Status = _zx_vmo_create(Size, ZX_VMO_RESIZABLE, &Vmo); in map() 82 dieOnMapUnmapError(Status == ZX_ERR_NO_MEMORY ? Size : 0); in map() [all …]
|
| D | wrappers_c_checks.h | 33 inline bool checkAlignedAllocAlignmentAndSize(uptr Alignment, uptr Size) { in checkAlignedAllocAlignmentAndSize() argument 35 !isAligned(Size, Alignment); in checkAlignedAllocAlignmentAndSize() 48 inline bool checkForCallocOverflow(uptr Size, uptr N, uptr *Product) { in checkForCallocOverflow() argument 50 return __builtin_umull_overflow(Size, N, Product); in checkForCallocOverflow() 52 *Product = Size * N; in checkForCallocOverflow() 53 if (!Size) in checkForCallocOverflow() 55 return (*Product / Size) != N; in checkForCallocOverflow() 61 inline bool checkForPvallocOverflow(uptr Size, uptr PageSize) { in checkForPvallocOverflow() argument 62 return roundUpTo(Size, PageSize) < Size; in checkForPvallocOverflow()
|
| /freebsd-12-stable/contrib/llvm-project/compiler-rt/lib/xray/ |
| D | xray_segmented_array.h | 84 uint64_t Size = 0; variable 90 Size(S) {} in Iterator() 99 if (++Offset % ElementsPerSegment || Offset == Size) 105 DCHECK_NE(Offset, Size); 118 if (PreviousOffset != Size && PreviousOffset % ElementsPerSegment == 0) { 171 uint64_t Size; variable 301 Size(0) {} in Array() 307 Size(0) {} in Array() 316 Size(O.Size) { in Array() 320 O.Size = 0; in Array() [all …]
|
| /freebsd-12-stable/sys/contrib/dev/acpica/components/utilities/ |
| D | uttrack.c | 181 ACPI_SIZE Size, 249 ACPI_SIZE Size, in AcpiUtAllocateAndTrack() argument 260 if (!Size) in AcpiUtAllocateAndTrack() 264 Size = 1; in AcpiUtAllocateAndTrack() 267 Allocation = AcpiOsAllocate (Size + sizeof (ACPI_DEBUG_MEM_HEADER)); in AcpiUtAllocateAndTrack() 273 "Could not allocate size %u", (UINT32) Size)); in AcpiUtAllocateAndTrack() 279 Allocation, Size, ACPI_MEM_MALLOC, Component, Module, Line); in AcpiUtAllocateAndTrack() 287 AcpiGbl_GlobalList->TotalSize += (UINT32) Size; in AcpiUtAllocateAndTrack() 288 AcpiGbl_GlobalList->CurrentTotalSize += (UINT32) Size; in AcpiUtAllocateAndTrack() 318 ACPI_SIZE Size, in AcpiUtAllocateZeroedAndTrack() argument [all …]
|
| /freebsd-12-stable/contrib/llvm-project/clang/lib/AST/Interp/ |
| D | InterpStack.cpp | 29 void *InterpStack::grow(size_t Size) { in grow() argument 30 assert(Size < ChunkSize - sizeof(StackChunk) && "Object too large"); in grow() 32 if (!Chunk || sizeof(StackChunk) + Chunk->size() + Size > ChunkSize) { in grow() 44 Chunk->End += Size; in grow() 45 StackSize += Size; in grow() 49 void *InterpStack::peek(size_t Size) { in peek() argument 53 while (Size > Ptr->size()) { in peek() 54 Size -= Ptr->size(); in peek() 59 return reinterpret_cast<void *>(Ptr->End - Size); in peek() 62 void InterpStack::shrink(size_t Size) { in shrink() argument [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/TargetProcess/ |
| D | RegisterEHFrames.cpp | 96 uint64_t Size = *reinterpret_cast<const uint32_t *>(CurCFIRecord); in walkAppleEHFrameSection() local 98 while (CurCFIRecord != End && Size != 0) { in walkAppleEHFrameSection() 99 const char *OffsetField = CurCFIRecord + (Size == 0xffffffff ? 12 : 4); in walkAppleEHFrameSection() 100 if (Size == 0xffffffff) in walkAppleEHFrameSection() 101 Size = *reinterpret_cast<const uint64_t *>(CurCFIRecord + 4) + 12; in walkAppleEHFrameSection() 103 Size += 4; in walkAppleEHFrameSection() 110 for (unsigned I = 0; I < Size; ++I) in walkAppleEHFrameSection() 119 CurCFIRecord += Size; in walkAppleEHFrameSection() 121 Size = *reinterpret_cast<const uint32_t *>(CurCFIRecord); in walkAppleEHFrameSection() 158 static Error registerEHFrameWrapper(JITTargetAddress Addr, uint64_t Size) { in registerEHFrameWrapper() argument [all …]
|
| /freebsd-12-stable/contrib/llvm-project/clang/include/clang/Analysis/Analyses/ |
| D | ThreadSafetyUtil.h | 88 : Data(Dat), Size(Sz), Capacity(Cp) {} in Data() 94 : Data(A.Data), Size(A.Size), Capacity(A.Capacity) { in SimpleArray() 96 A.Size = 0; in SimpleArray() 103 Size = RHS.Size; 107 RHS.Size = RHS.Capacity = 0; 119 memcpy(Data, Odata, sizeof(T) * Size); in reserve() 126 else if (Size + N < Capacity) in reserveCheck() 127 reserve(u_max(Size + N, Capacity * 2), A); in reserveCheck() 135 size_t size() const { return Size; } in size() 139 assert(i < Size && "Array index out of bounds."); [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/ |
| D | AVRAsmBackend.cpp | 77 static void adjustBranch(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in adjustBranch() argument 81 unsigned_width(Size + 1, Value, std::string("branch target"), Fixup, Ctx); in adjustBranch() 88 static void adjustRelativeBranch(unsigned Size, const MCFixup &Fixup, in adjustRelativeBranch() argument 92 signed_width(Size + 1, Value, std::string("branch target"), Fixup, Ctx); in adjustRelativeBranch() 104 static void fixup_call(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in fixup_call() argument 106 adjustBranch(Size, Fixup, Value, Ctx); in fixup_call() 120 static void fixup_7_pcrel(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in fixup_7_pcrel() argument 122 adjustRelativeBranch(Size, Fixup, Value, Ctx); in fixup_7_pcrel() 134 static void fixup_13_pcrel(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in fixup_13_pcrel() argument 136 adjustRelativeBranch(Size, Fixup, Value, Ctx); in fixup_13_pcrel() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/compiler-rt/lib/scudo/ |
| D | scudo_allocator.cpp | 200 void *Allocate(uptr Size) { in Allocate() 302 void *allocate(uptr Size, uptr Alignment, AllocType Type, in allocate() 316 if (void *Ptr = GuardedAlloc.allocate(Size, Alignment)) { in allocate() 318 __sanitizer_malloc_hook(Ptr, Size); in allocate() 324 const uptr NeededSize = RoundUpTo(Size ? Size : 1, MinAlignment) + in allocate() 328 if (UNLIKELY(Size >= MaxAllowedMallocSize) || in allocate() 332 reportAllocationSizeTooBig(Size, AlignedSize, MaxAllowedMallocSize); in allocate() 364 reportOutOfMemory(Size); in allocate() 382 DCHECK_LE(UserPtr + Size, reinterpret_cast<uptr>(BackendPtr) + BackendSize); in allocate() 387 Header.SizeOrUnusedBytes = Size; in allocate() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| D | ASanStackFrameLayout.cpp | 41 static size_t VarAndRedzoneSize(size_t Size, size_t Granularity, in VarAndRedzoneSize() argument 44 if (Size <= 4) Res = 16; in VarAndRedzoneSize() 45 else if (Size <= 16) Res = 32; in VarAndRedzoneSize() 46 else if (Size <= 128) Res = Size + 32; in VarAndRedzoneSize() 47 else if (Size <= 512) Res = Size + 64; in VarAndRedzoneSize() 48 else if (Size <= 4096) Res = Size + 128; in VarAndRedzoneSize() 49 else Res = Size + 256; in VarAndRedzoneSize() 77 size_t Size = Vars[i].Size; in ComputeASanStackFrameLayout() local 81 assert(Size > 0); in ComputeASanStackFrameLayout() 84 size_t SizeWithRedzone = VarAndRedzoneSize(Size, Granularity, in ComputeASanStackFrameLayout() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ |
| D | WholeProgramDevirt.h | 45 std::pair<uint8_t *, uint8_t *> getPtrToData(uint64_t Pos, uint8_t Size) { in getPtrToData() 46 if (Bytes.size() < Pos + Size) { in getPtrToData() 47 Bytes.resize(Pos + Size); in getPtrToData() 48 BytesUsed.resize(Pos + Size); in getPtrToData() 55 void setLE(uint64_t Pos, uint64_t Val, uint8_t Size) { in setLE() 57 auto DataUsed = getPtrToData(Pos / 8, Size); in setLE() 58 for (unsigned I = 0; I != Size; ++I) { in setLE() 67 void setBE(uint64_t Pos, uint64_t Val, uint8_t Size) { in setBE() 69 auto DataUsed = getPtrToData(Pos / 8, Size); in setBE() 70 for (unsigned I = 0; I != Size; ++I) { in setBE() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/MC/ |
| D | StringTableBuilder.cpp | 35 Size = 0; in initSize() 39 Size = 2; in initSize() 45 Size = 1; in initSize() 50 Size = 4; in initSize() 80 support::endian::write32le(Buf, Size); in write() 82 support::endian::write32be(Buf, Size); in write() 153 size_t Pos = Size - S.size() - (K != RAW); in finalizeStringTable() 160 Size = alignTo(Size, Alignment); in finalizeStringTable() 161 P->second = Size; in finalizeStringTable() 163 Size += S.size(); in finalizeStringTable() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/X86/AsmParser/ |
| D | X86Operand.h | 64 unsigned Size; member 133 if (Mem.Size) in print() 134 OS << ",Size=" << Mem.Size; in print() 293 return Kind == Memory && Mem.Size == 0; in isMemUnsized() 296 return Kind == Memory && (!Mem.Size || Mem.Size == 8); in isMem8() 299 return Kind == Memory && (!Mem.Size || Mem.Size == 16); in isMem16() 302 return Kind == Memory && (!Mem.Size || Mem.Size == 32); in isMem32() 305 return Kind == Memory && (!Mem.Size || Mem.Size == 64); in isMem64() 308 return Kind == Memory && (!Mem.Size || Mem.Size == 80); in isMem80() 311 return Kind == Memory && (!Mem.Size || Mem.Size == 128); in isMem128() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/ |
| D | RuntimeDyldChecker.h | 82 : ContentPtr(Content.data()), Size(Content.size()), in MemoryRegionInfo() 86 MemoryRegionInfo(uint64_t Size, JITTargetAddress TargetAddress) in MemoryRegionInfo() argument 87 : Size(Size), TargetAddress(TargetAddress) {} in MemoryRegionInfo() 91 assert(Size && "setContent/setZeroFill must be called first"); in isZeroFill() 97 assert(!ContentPtr && !Size && "Content/zero-fill already set"); in setContent() 99 Size = Content.size(); in setContent() 103 void setZeroFill(uint64_t Size) { in setZeroFill() argument 104 assert(!ContentPtr && !this->Size && "Content/zero-fill already set"); in setZeroFill() 105 this->Size = Size; in setZeroFill() 111 return {ContentPtr, static_cast<size_t>(Size)}; in getContent() [all …]
|
| /freebsd-12-stable/contrib/llvm-project/llvm/lib/Support/ |
| D | FormattedStream.cpp | 26 void formatted_raw_ostream::UpdatePosition(const char *Ptr, size_t Size) { in UpdatePosition() argument 58 if (Size < BytesFromBuffer) { in UpdatePosition() 61 PartialUTF8Char.append(StringRef(Ptr, Size)); in UpdatePosition() 71 Size -= BytesFromBuffer; in UpdatePosition() 77 for (const char *End = Ptr + Size; Ptr < End; Ptr += NumBytes) { in UpdatePosition() 96 void formatted_raw_ostream::ComputePosition(const char *Ptr, size_t Size) { in ComputePosition() argument 100 if (Ptr <= Scanned && Scanned <= Ptr + Size) in ComputePosition() 103 UpdatePosition(Scanned, Size - (Scanned - Ptr)); in ComputePosition() 105 UpdatePosition(Ptr, Size); in ComputePosition() 108 Scanned = Ptr + Size; in ComputePosition() [all …]
|