From 666192bc32db86ee1ae1bc43876518cc09b36de2 Mon Sep 17 00:00:00 2001 From: "lei.chen" Date: Sat, 5 Sep 2026 02:21:07 +0000 Subject: [PATCH] merge-fix(worker): guard rejoin resend_job_status against NULL worker_list controller_connector_test (worker-rejoin-resync, THEIRS) fixtures a zeroed cc_ctx with worker_list == NULL and drives rejoin success; our bug-1509 resend-on-rejoin call dereferenced *cc_ctx->worker_list and SEGV'd (ASan null read at controller_connector.c:536). worker_list is NULL until the first job dispatch on a worker, so guard the re-report on it. Co-Authored-By: Claude Code --- src/worker/src/controller_connector.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/worker/src/controller_connector.c b/src/worker/src/controller_connector.c index ec1e4061..8544532b 100755 --- a/src/worker/src/controller_connector.c +++ b/src/worker/src/controller_connector.c @@ -532,8 +532,12 @@ int checking_connection() * state on every rejoin, not just at startup, so the * controller reconciles its view after the disconnect window * (clears UNKWN on a live claim; converges to a terminal - * state for processes that are gone). */ - (void)resend_job_status(*cc_ctx->worker_list); + * state for processes that are gone). worker_list is NULL + * until the first job is dispatched on this worker, and some + * rejoin tests exercise the rejoin path without one. */ + if (cc_ctx != NULL && cc_ctx->worker_list != NULL) { + (void)resend_job_status(*cc_ctx->worker_list); + } } else { XCECD_LOG(XCE_LOG_WARN, "checking_connection: rejoin after transparent "