DebugAllocatorInit
Description
Construct a DebugAllocator with DEBUG_ALLOCATOR_DEFAULTS (all diagnostics on except page-backed UAF detection). The most common entry point for callers that just want leak + canary + trace tracking layered on top of HeapAllocator.
Success
Returns a fully-initialised DebugAllocator value with the defaults baseline; same post-init state as DebugAllocatorInitWith(DEBUG_ALLOCATOR_DEFAULTS).
Failure
Cannot fail at macro-expansion time.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Default.h:81:
.track_freed_history = true}))
# else
# define DefaultAllocatorInit() DebugAllocatorInit()
# endif
#else- In
AllocDebug.c:30:
bool test_debug_normal_alloc_free(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:54:
bool test_debug_zero_byte_alloc(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:65:
bool test_debug_null_free_is_noop(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:82:
bool test_debug_catches_overflow(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:98:
bool test_debug_leak_count(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:112:
bool test_debug_report_leaks_emits_traces(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:146:
bool test_debug_alloc_trace_captured(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:168:
bool test_debug_freed_history_grows_on_free(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:223:
bool test_debug_remap_grows(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:245:
bool test_debug_remap_to_zero_frees(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:258:
bool test_debug_remap_from_null_allocates(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:295:
bool test_debug_double_free_aborts(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:308:
// live map -> forwarded to underlying Heap, which LOG_FATALs as
// foreign pointer.
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:331:
bool test_ad1_canary_detects_non_first_byte(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:367:
bool test_ad1_freed_alloc_trace_n_copied(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:393:
bool test_ad1_freed_alloc_trace_bytes_copied(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:501:
bool test_ad1_stats_deallocations_increment(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:522:
bool test_ad1_stats_bytes_in_use_partial_free(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:545:
bool test_ad1_clean_roundtrip_no_false_overflow(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:566:
bool test_ad1_double_free_aborts(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:579:
bool test_ad1_foreign_free_aborts(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:610:
bool test_ad2_alloc_bumps_live_bytes(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:629:
bool test_ad2_alloc_increments_allocations(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:648:
bool test_ad2_alloc_accumulates_bytes_requested(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:670:
bool test_ad2_alloc_bumps_stats_bytes_in_use(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:687:
bool test_ad2_alloc_tracks_peak_value(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:709:
bool test_ad2_peak_advances_on_first_alloc(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:728:
bool test_ad2_peak_holds_historical_max(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:754:
bool test_ad2_failed_alloc_counter(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:778:
// [1, MAX_TRACE]; a const 42 is out of range.
bool test_ad2_trace_count_within_bounds(void) {
DebugAllocator dbg = DebugAllocatorInit(); // capture_traces, trace_depth=8
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:854:
// inside [0, N)).
bool test_ad2_full_width_write_is_clean(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:873:
// allocate returns a usable, correctly sized, zeroed region when asked.
bool test_ad2_zeroed_region_is_zero_and_sized(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:900:
// broken hash would surface here as a spurious FATAL or a leak).
bool test_ad2_hash_tracks_many_allocations(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:944:
// point shape; the validate gate is exercised by the deadend below.
bool test_ad2_resize_refuses_in_place(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:973:
// Canary write side: alloc N, write N+1 -> overflow detected (counter).
bool test_ad2_overflow_one_past_detected(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
AllocDebug.c:994:
// would silently return 0 instead of aborting.
bool test_ad2_resize_validates_self(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);
bool test_ad3_remap_grow_preserves_full_old_width(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg); // canary (overflows stays 0); the mutant corrupts it.
bool test_ad3_remap_shrink_copy_is_min_not_max(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg); // aborts; deadend captures it.
bool test_ad3_remap_unknown_ptr_aborts(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg); // summary line and no frame markers.
bool test_ad3_report_leaks_includes_trace_frames(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg); // Deadend: real code aborts here.
bool test_ad3_structural_runs_on_first_entry(void) {
DebugAllocator dbg = DebugAllocatorInit();
// Corrupt the embedded heap magic before the first validating entry
// point; the validated bit is still set, so structural runs.
// on) by the mutant. Normal test: real returns true; the mutant aborts.
bool test_ad3_structural_skipped_after_first_op(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg); // trigger structural validation; real code accepts, the mutant aborts.
bool test_ad3_structural_accepts_pow2_alignment(void) {
DebugAllocator dbg = DebugAllocatorInit();
// Valid power-of-two alignment; validated bit still set so the first
// entry runs structural and exercises the pow2 check.
// `bytes!=0`) LOG_FATALs. Normal test: real returns true.
bool test_ad3_structural_allows_live_allocation(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg); // Deadend: real code aborts here.
bool test_af_structural_checks_page_magic(void) {
DebugAllocator dbg = DebugAllocatorInit();
// Corrupt the embedded page allocator's magic before the first
// validating entry. The validated bit is still set, so structural
bool test_blind_stats_bytes_in_use_underflow_clamps_zero(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);
bool test_blind_report_leaks_emits_all_frames(void) {
DebugAllocator dbg = DebugAllocatorInit(); // capture_traces on, depth 8
Allocator *adbg = ALLOCATOR_OF(&dbg);
bool test_blind_report_leaks_no_extra_frame(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
ArgParse.c:1923:
WriteFmt("Testing print_help frees per-spec left-column Strs (414:9)\n");
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Init.c:218:
WriteFmt("Testing GraphDeinit frees the pending-edge-removals backing (no leak)\n");
DebugAllocator dbg = DebugAllocatorInit();
typedef Graph(int) IntGraph;- In
Insert.c:1840:
// event -- so asserting zero overflows kills the mutant deterministically
// instead of relying on a chance heap crash.
DebugAllocator dbg = DebugAllocatorInit();
MutElemVec vec = VecInitWithDeepCopy(mut_copy_init, mut_copy_deinit, &dbg); WriteFmt("Testing BitVecRotateRight frees its temp clone (1157:5)\n");
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Math.c:3399:
WriteFmt("Testing int_pow_mod frees internal temporaries\n");
DebugAllocator dbg = DebugAllocatorInit();
Int base = IntFrom(123456789u, &dbg.base);- In
Write.c:4770:
// --- leak-guard / scratch-leak helpers relocated from Io.Blind.c + Io.Leak.c ---
#define DBG_BEGIN(dbg, out) \
DebugAllocator dbg = DebugAllocatorInit(); \
Str out = StrInit(&dbg)- In
Read.c:2494:
// ===========================================================================
static bool test_read_zstr_no_leak(void) {
DebugAllocator dbg = DebugAllocatorInit();
char *s = NULL;
Zstr in = "hello world";- In
Read.c:2512:
// dtor leak.
static bool test_read_bitvec_hex(void) {
DebugAllocator dbg = DebugAllocatorInit();
BitVec bv = BitVecInit(&dbg.base);
Zstr z = "0x1";- In
Read.c:2537:
// 3145/3154 scratch leak, 3150:21 lt_to_le `bit_len < 3` (octal min width).
static bool test_read_bitvec_octal(void) {
DebugAllocator dbg = DebugAllocatorInit();
BitVec bv = BitVecInit(&dbg.base);
Zstr z = "0o1";- In
Read.c:2550:
// 3178 scratch leak for the binary path.
static bool test_read_bitvec_binary(void) {
DebugAllocator dbg = DebugAllocatorInit();
BitVec bv = BitVecInit(&dbg.base);
Zstr z = "10110";- In
Read.c:2564:
// scratch leak, value round-trip.
static bool test_read_int_plain(void) {
DebugAllocator dbg = DebugAllocatorInit();
Int v = IntInit(&dbg.base);
Zstr z = "12345";- In
Read.c:2631:
// ===========================================================================
static bool test_read_float_value(void) {
DebugAllocator dbg = DebugAllocatorInit();
Float f = FloatInit(&dbg.base);
Zstr z = "3.14159";- In
Read.c:2647:
// the sentinel and frees scratch.
static bool test_read_float_reject_no_leak(void) {
DebugAllocator dbg = DebugAllocatorInit();
Float f = FloatInit(&dbg.base);
(void)FloatTryFromStr(&f, "42");- In
Init.c:281:
// live-allocation count returning to its pre-split baseline (Str.Mutants4).
static bool test_str_deinit_releases_split_elements(void) {
DebugAllocator dbg = DebugAllocatorInit();
// Each piece is long enough to force its own heap buffer.
- In
Init.c:310:
static bool test_deinit_frees_buffer(void) {
WriteFmt("Testing StrDeinit releases the backing allocation\n");
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Remove.c:326:
static bool test_map_deep_copy_deinit_on_remove(void) {
typedef Map(Zstr, Zstr) ZstrMap;
DebugAllocator dbg = DebugAllocatorInit();
// Deep-copy callbacks for both key and value, plus a value comparator
// so the pair-level removal API is usable. The map owns Zstr clones it
- In
PdbCache.c:398:
// -----------------------------------------------------------------------------
bool test_pdb_cache_missing_pdb_no_leak(void) {
DebugAllocator alloc = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&alloc);
size baseline = DebugAllocatorLiveCount(&alloc);- In
PdbCache.c:433:
// -----------------------------------------------------------------------------
bool test_pdb_cache_guid_mismatch_no_leak(void) {
DebugAllocator alloc = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&alloc);
size baseline = DebugAllocatorLiveCount(&alloc);- In
PdbCache.c:473:
// -----------------------------------------------------------------------------
bool test_pdb_cache_second_module_hits_cache(void) {
DebugAllocator alloc = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&alloc);- In
PdbCache.c:522:
// -----------------------------------------------------------------------------
bool test_pdb_cache_deinit_frees_all(void) {
DebugAllocator alloc = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&alloc);
size baseline = DebugAllocatorLiveCount(&alloc);- In
PdbCache.c:708:
// divergence. A DebugAllocator also pins leak-freedom on the open-failure path.
bool test_pdb_cache_invalid_sidecar_pdb_rejected(void) {
DebugAllocator alloc = DebugAllocatorInit();
Allocator *a = ALLOCATOR_OF(&alloc);
size baseline = DebugAllocatorLiveCount(&alloc);- In
PdbCache.c:789:
// entry `++i` and `--i` both free exactly entry[0].)
bool test_pdb_cache_deinit_frees_all_entries(void) {
DebugAllocator alloc = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&alloc);
size baseline = DebugAllocatorLiveCount(&alloc);- In
SysDns.c:1312:
// The (Zstr, len) overload must not leak its internal path copy.
static bool test_addpath_zstr_len_no_leak(void) {
DebugAllocator alloc = DebugAllocatorInit();
Allocator *a = ALLOCATOR_OF(&alloc);- In
SysDns.c:2057:
static bool test_deinit_no_leak(void) {
DebugAllocator alloc = DebugAllocatorInit();
Allocator *a = ALLOCATOR_OF(&alloc);
size baseline = DebugAllocatorLiveCount(&alloc);- In
SysDns.c:2076:
static bool test_init_real_disk_no_leak(void) {
DebugAllocator alloc = DebugAllocatorInit();
Allocator *a = ALLOCATOR_OF(&alloc);
size baseline = DebugAllocatorLiveCount(&alloc);- In
MachoCache.c:611:
// per-entry StrDeinit (54/141) and MachoDeinit (140) cleanups.
bool test_mc_main_symtab_no_leak(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
MachoCache.c:645:
// compare (42 ZstrCompare->42).
bool test_mc_cache_hit_and_distinct(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
MachoCache.c:702:
// count returns to baseline after deinit.
bool test_mc_dsym_symtab_no_leak(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
MachoCache.c:739:
// path must not leak: the post-deinit live count returns to baseline.
bool test_mc_dsym_uuid_mismatch_no_leak(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
MachoCache.c:780:
// Also drives DwarfFunctionsDeinit (136) on deinit; verified leak-free.
bool test_mc_dwarf_resolves_and_no_leak(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg); // pins the build's success/failure result to an observable.
bool test_bl_dwarf_resolves_no_leak(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg); // re-opens the module -> live count rises.
bool test_sr_cache_hit_same_module(void) {
DebugAllocator alloc = DebugAllocatorInit();
SymbolResolver res;
if (!SymbolResolverInit(&res, ALLOCATOR_OF(&alloc))) { // re-open. A mutant breaking `ZstrCompare(...) == 0` misses and re-opens.
bool test_sr_cache_zstrcompare_fallback(void) {
DebugAllocator alloc = DebugAllocatorInit();
SymbolResolver res;
if (!SymbolResolverInit(&res, ALLOCATOR_OF(&alloc))) { // address -> wrong module_path and no second open.
bool test_sr_cache_cross_module_distinct(void) {
DebugAllocator alloc = DebugAllocatorInit();
SymbolResolver res;
if (!SymbolResolverInit(&res, ALLOCATOR_OF(&alloc))) { // loop must walk PAST entry[0]; nothing re-opens.
bool test_sr_cache_other_module_rehit(void) {
DebugAllocator alloc = DebugAllocatorInit();
SymbolResolver res;
if (!SymbolResolverInit(&res, ALLOCATOR_OF(&alloc))) { // frees everything and the live count returns to the pre-Init baseline.
bool test_sr_deinit_frees_everything(void) {
DebugAllocator alloc = DebugAllocatorInit();
size baseline = DebugAllocatorLiveCount(&alloc); // which the DebugAllocator live count catches.
bool test_sr_deinit_two_modules_frees_all(void) {
DebugAllocator alloc = DebugAllocatorInit();
size baseline = DebugAllocatorLiveCount(&alloc); // DwarfCfiDeinit arm leaks it; the live count fails to return to baseline.
bool test_sr_findfde_teardown_frees_cfi(void) {
DebugAllocator alloc = DebugAllocatorInit();
size baseline = DebugAllocatorLiveCount(&alloc); // return to baseline.
bool test_sidecardwarf_teardown_frees_sidecar_functions(void) {
DebugAllocator alloc = DebugAllocatorInit();
size baseline = DebugAllocatorLiveCount(&alloc);- In
SidecarSub.c:58:
// to baseline; dropping it leaks and the count stays high.
bool test_sidecarsub_teardown_frees(void) {
DebugAllocator alloc = DebugAllocatorInit();
size baseline = DebugAllocatorLiveCount(&alloc);- In
Sidecar.c:71:
// stays high.
bool test_sidecar_teardown_frees_sidecar(void) {
DebugAllocator alloc = DebugAllocatorInit();
size baseline = DebugAllocatorLiveCount(&alloc); // them. Dropping either Deinit arm leaks; the live count fails to return.
bool test_dwarffallback_teardown_frees(void) {
DebugAllocator alloc = DebugAllocatorInit();
size baseline = DebugAllocatorLiveCount(&alloc);- In
Pe.c:1567:
// Asserting NULL kills the mutant.
static bool test_pe_blind_find_empty_name_returns_null(void) {
DebugAllocator alloc = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&alloc);- In
Dns.c:2070:
// ---------------------------------------------------------------------------
static bool test_leak_record_target_freed(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Dns.c:2144:
// ---------------------------------------------------------------------------
static bool test_leak_authority_list_freed(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Dns.c:2172:
// ---------------------------------------------------------------------------
static bool test_leak_additional_list_freed(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Pdb.c:2385:
// per-stream arrays / taken Buf leak.
bool test_pd4_failed_open_frees_all(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
Pdb.c:2424:
// name-pool buffer leaks.
bool test_pd4_deinit_frees_name_pool(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
Pdb.c:3055:
// ===========================================================================
static bool test_multiblock_directory_no_overrun(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
Pdb.c:3097:
// ===========================================================================
static bool test_many_sections_no_overrun(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
ProcMaps.c:316:
// and wrongly match. Kills `i < VecLen` -> `i <= VecLen`.
bool test_pm2_find_no_overrun_past_length(void) {
DebugAllocator alloc = DebugAllocatorInit();
ProcMaps pm;
MemSet(&pm, 0, sizeof(pm));- In
ProcMaps.c:360:
// removed-Deinit mutation observably.
bool test_pm2_deinit_releases_all(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
ProcMaps.c:635:
// kills the removed-Deinit mutation on the read-failure arm.
bool test_pm_load_from_file_read_fail_frees_raw(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
Http.c:294:
// reclaim is the vec's own copies -- exactly what the L31/L32 callback frees.
bool test_hl_headers_vec_deinit_releases_values(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Http.c:322:
// dropping its StrDeinit leaks it even though VecDeinit + MemSet still run.
bool test_hl_request_deinit_releases_url(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Http.c:347:
// previous body. Pre-fill the body via one HtmlRespond, then call again.
bool test_hl_respond_with_html_releases_old_body(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Http.c:376:
// body.
bool test_hl_respond_with_file_releases_old_body(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
MachO.c:1486:
// buffer has been taken/allocated.
bool test_mh2_fail_path_frees_buffer(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
Dwarf.c:2626:
// ---------------------------------------------------------------------------
bool test_dw4_build_frees_cu_strings(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
Dwarf.c:2672:
// ---------------------------------------------------------------------------
bool test_dw4_deinit_releases_string_pool(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *base = ALLOCATOR_OF(&dbg);- In
Parse.c:698:
// config teardown and pushes LiveCount above 0.
static bool test_kv_leak_value_strip_frees_old_buffer(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Parse.c:732:
// heap buffer the live count must account for.
static bool test_kv_leak_parse_frees_local_key(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Parse.c:762:
// key-side buffer from masking the value-side leak.
static bool test_kv_leak_parse_frees_local_value(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);- In
Parse.c:794:
// teardown. A long lookup key keeps the temp off any inline fast path.
static bool test_kv_leak_get_ptr_zstr_frees_lookup(void) {
DebugAllocator dbg = DebugAllocatorInit();
Allocator *adbg = ALLOCATOR_OF(&dbg);
Last updated on