DebugAllocatorOverflows
Description
Number of canary-corruption events caught by free-time canary verification since this DebugAllocator was initialised.
Parameters
| Name | Direction | Description |
|---|---|---|
self |
in | DebugAllocator instance, or NULL. |
Success
Returns the overflow counter. No state is touched.
Failure
Returns 0 when self is NULL.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Debug.c:517:
}
size DebugAllocatorOverflows(const DebugAllocator *self) {
if (!self)
return 0;- In
Pdb.Blind.c:262:
PdbDeinit(&pdb);
// No heap write may have overrun any allocation (canary intact).
ok = ok && DebugAllocatorOverflows(&dbg) == 0;
DebugAllocatorDeinit(&dbg);
return ok;- In
Pdb.Blind.c:302:
if (opened)
PdbDeinit(&pdb);
ok = ok && DebugAllocatorOverflows(&dbg) == 0;
DebugAllocatorDeinit(&dbg);
return ok;- In
AllocDebug.c:47:
ok = ok && DebugAllocatorLiveCount(&dbg) == 0;
ok = ok && DebugAllocatorLiveBytes(&dbg) == 0;
ok = ok && DebugAllocatorOverflows(&dbg) == 0;
DebugAllocatorDeinit(&dbg);- In
AllocDebug.c:89:
AllocatorFree(adbg, buf);
bool ok = DebugAllocatorOverflows(&dbg) == 1;
DebugAllocatorDeinit(&dbg);
return ok;- In
AllocDebug.c:340:
AllocatorFree(adbg, buf);
ok = ok && (DebugAllocatorOverflows(&dbg) == 1);
DebugAllocatorDeinit(&dbg);
return ok;- In
AllocDebug.c:556:
AllocatorFree(adbg, buf);
ok = ok && (DebugAllocatorOverflows(&dbg) == 0);
ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
DebugAllocatorDeinit(&dbg);- In
AllocDebug.c:866:
AllocatorFree(adbg, buf); // must be a clean free, no overflow
ok = ok && (DebugAllocatorOverflows(&dbg) == 0);
DebugAllocatorDeinit(&dbg);
return ok;- In
AllocDebug.c:887:
}
AllocatorFree(adbg, buf);
ok = ok && (DebugAllocatorOverflows(&dbg) == 0);
DebugAllocatorDeinit(&dbg);
return ok;- In
AllocDebug.c:984:
// The canary sits exactly at offset n; a one-past write corrupts it.
ok = ok && (DebugAllocatorOverflows(&dbg) == 1);
DebugAllocatorDeinit(&dbg);
return ok; // A max-copy mutant would have stomped the fresh canary; real code
// leaves it pristine.
ok = ok && (DebugAllocatorOverflows(&dbg) == 0);
DebugAllocatorDeinit(&dbg);
Last updated on