--- id: "bug-208" status: "fixed" status_updated: "2026-09-24" status_note: "" component: "scheduler" severity: "leak" timestamp: "2026-05-31" last_seen: "2026-09-19T09:00:00Z" occurrences: 1 files: ["src/scheduler/testsuite/test.c"] tags: ["asan", "leak", "scheduler", "test", "host_eval_ctx"] related: [] legacy: true --- # bug-208: ASAN LeakSanitizer: detected memory leaks in scheduler testsuite — build exits with error code ## Description ASAN LeakSanitizer: detected memory leaks in scheduler testsuite — build exits with error code ## Environment _Not recorded (migrated from buglog.json)._ ## Reproduction _Not recorded (migrated from buglog.json)._ ## Root cause sched_meet_host_selection() lazily allocates w->host_eval_ctx via build_host_eval_ctx(). Four test functions (test_meet_host_selection_always_true_passes, test_meet_host_selection_always_false_fails, test_meet_host_selection_numeric_match, test_meet_host_selection_string_match) called zarray_fini() without first calling sched_worker_release_host_ctx() to free the lazily-allocated host_eval_ctx. ## Fix Added sched_worker_release_host_ctx(&w) calls before zarray_fini() in all four affected test functions. ## Verification _Not recorded (migrated from buglog.json)._ ## References _Not recorded (migrated from buglog.json)._