From ea5087baf6dc09115a5a89fbf1afd0990e35debf Mon Sep 17 00:00:00 2001 From: chrg6 Date: Fri, 13 Nov 2026 17:17:01 -0500 Subject: [PATCH] Let workers_drain drop a queued fast-link job without reading its missing library. link_queue puts a draw's fast link on the library queue as a LibJob with p set and no library (b NULL); lib_worker and pipe_worker branch on that, but workers_drain cleared j->b->job for every queued job, a NULL dereference when vk_pipeline_shutdown found one. It now clears the library's fields only when the job has one and clears the pipeline's link_queued when it names a pipeline. Only the probes shut the pipelines down (mesh_fb_probe.c, vk_exec_probe.c); the game never does. Not reproduced before the change (the probes need approval). vk_pipeline.c compiles with no new warnings. Co-Authored-By: Claude Opus 5.5 --- runtime/vk_pipeline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/vk_pipeline.c b/runtime/vk_pipeline.c index ba139557..10566d58 100644 --- a/runtime/vk_pipeline.c +++ b/runtime/vk_pipeline.c @@ -5282,7 +5282,8 @@ static void workers_drain(void) { A.low = A.low_tail = NULL; for (LibJob *j = U.head, *n; j; j = n) { // queued library jobs too: their entries read as failed builds n = j->next; - j->b->job = NULL, j->b->building = 0; + if (j->b) j->b->job = NULL, j->b->building = 0; // a draw's fast link (link_queue) names its pipeline, not a library + if (j->p) j->p->link_queued = 0; free(j); } U.head = U.tail = NULL;