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 <noreply@anthropic.com>
This commit is contained in:
lei.chen 2026-09-05 02:21:07 +00:00
parent 27e81738d7
commit 666192bc32

View file

@ -532,8 +532,12 @@ int checking_connection()
* state on every rejoin, not just at startup, so the * state on every rejoin, not just at startup, so the
* controller reconciles its view after the disconnect window * controller reconciles its view after the disconnect window
* (clears UNKWN on a live claim; converges to a terminal * (clears UNKWN on a live claim; converges to a terminal
* state for processes that are gone). */ * state for processes that are gone). worker_list is NULL
(void)resend_job_status(*cc_ctx->worker_list); * 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 { } else {
XCECD_LOG(XCE_LOG_WARN, XCECD_LOG(XCE_LOG_WARN,
"checking_connection: rejoin after transparent " "checking_connection: rejoin after transparent "