myxce/.wolf
lei.chen ff2d784ca9 fix(apiserver): don't free client config C-strings that the C library retains (bug-1501)
tryConnect built the xce_client_config_t with C.CString(host/from/key), then a
defer freed all three. But xcecli_ctx_init stores the config POINTER
(ctx->conf = config), not a copy — client_failover.c dereferences
config->masters/from/key for the client's ENTIRE lifetime (e.g.
xce_failover_next_target strncpy's a master host on every write-fail/redirect).
Freeing the strings left config->masters[0] dangling → ASAN heap-use-after-free
(strncpy in the background C thread) after a few submits.

Fix: keep the three C strings for the process lifetime (tryConnect runs once at
startup, gCtx is a process-global); free them only on the init-failure path.

Verified: 6 consecutive job submits, apiserver stays up, 0 ASAN errors
(previously crashed after ~2-3 submits).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-04 08:59:06 +00:00
..
hooks fix(apiserver): carry exec_user on job submit so jobs don't run as nobody (bug-1500) 2026-08-04 07:38:43 +00:00
anatomy.md fix(apiserver): carry exec_user on job submit so jobs don't run as nobody (bug-1500) 2026-08-04 07:38:43 +00:00
buglog.json fix(apiserver): don't free client config C-strings that the C library retains (bug-1501) 2026-08-04 08:59:06 +00:00
cerebrum.md chore(wolf): record rule — never push to Rongsong's branch without permission 2026-08-01 03:41:47 +00:00
config.json chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
cron-manifest.json chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
cron-state.json chore: sync OpenWolf state (buglog, cerebrum, memory, anatomy) 2026-07-03 02:41:41 +00:00
daemon.log chore: sync OpenWolf state (buglog, cerebrum, memory, anatomy) 2026-07-03 02:41:41 +00:00
designqc-report.json chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
identity.md chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
memory.md fix(apiserver): carry exec_user on job submit so jobs don't run as nobody (bug-1500) 2026-08-04 07:38:43 +00:00
OPENWOLF.md chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
reframe-frameworks.md chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
suggestions.json chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
token-ledger.json fix(apiserver): carry exec_user on job submit so jobs don't run as nobody (bug-1500) 2026-08-04 07:38:43 +00:00