• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/compiler-rt/lib/asan/

Lines Matching refs:chunk

53 // The memory chunk allocated from the underlying allocator looks like this:
103 // Every chunk of memory allocated by this allocator can be in one of 3 states:
104 // CHUNK_AVAILABLE: the chunk is in the free list and ready to be allocated.
105 // CHUNK_ALLOCATED: the chunk is allocated and not yet freed.
106 // CHUNK_QUARANTINE: the chunk was freed and put into quarantine zone.
154 // contents of deallocated chunk, confusing GetAsanChunk lookup.
196 // We are about to unmap a chunk of user memory.
298 void RePoisonChunk(uptr chunk) {
299 // This could be a user-facing chunk (with redzones), or some internal
300 // housekeeping chunk, like TransferBatch. Start by assuming the former.
301 AsanChunk *ac = GetAsanChunk((void *)chunk);
305 uptr chunk_end = chunk + allocated_size;
306 if (chunk < beg && beg < end && end <= chunk_end &&
309 PoisonShadow(chunk, beg - chunk, kAsanHeapLeftRedzoneMagic);
317 PoisonShadow(chunk, allocated_size, kAsanHeapLeftRedzoneMagic);
330 [](uptr chunk, void *alloc) {
331 ((Allocator *)alloc)->RePoisonChunk(chunk);
381 // Prefer an allocated chunk over freed chunk and freed chunk
382 // over available chunk.
484 // chunk. This is possible if CanPoisonMemory() was false for some
564 // Set quarantine flag if chunk is allocated, issue ASan error report on
574 // It's not safe to push a chunk in quarantine on invalid free.
581 // Expects the chunk to already be marked as quarantined by using
594 // We have to skip the chunk header, it contains free_context_id.
645 // Must mark the chunk as quarantined before any changes to its metadata.
646 // Do not quarantine given chunk if we failed to set CHUNK_QUARANTINE flag.
760 // The address is in the chunk's left redzone, so maybe it is actually
761 // a right buffer overflow from the other chunk to the left.
762 // Search a bit to the left to see if there is another chunk.
766 if (m2 == m1) continue; // Still the same chunk.
1029 uptr chunk = m->Beg();
1033 return chunk;
1034 if (IsSpecialCaseOfOperatorNew0(chunk, m->UsedSize(/*locked_version*/ true),
1036 return chunk;
1040 uptr GetUserBegin(uptr chunk) {
1041 __asan::AsanChunk *m = __asan::instance.GetAsanChunkByAddrFastLocked(chunk);
1046 LsanMetadata::LsanMetadata(uptr chunk) {
1047 metadata_ = reinterpret_cast<void *>(chunk - __asan::kChunkHeaderSize);