myxce/src/tools
Rongsong Shen 9318f9977e fix: close bug-1401 ctrlstatus leak, bug-1400 jobsub leak; harden bug-1396 harness
bug-1401: xce_free_ctrlstatus(s) was defined as free_CtrlStatus(s), which
only frees the fields inside xce_ctrlstatus_t. The real client reply path
(decode_CtrlStatus_ptr) calloc's the struct itself, so every ctrlstatus call
leaked sizeof(xce_ctrlstatus_t) (120 bytes). Existing unit tests never caught
it because they built/freed the struct via the raw stack-decode + bare
free_CtrlStatus() helpers, never exercising the actual client macro. Fixed
by switching the macro to free_CtrlStatus_ptr(&(s)) and added a regression
test that exercises the real heap-decode path; RED confirmed the exact
120-byte/1-alloc LeakSanitizer signature before the fix.

bug-1400: the originally reported SEGV in cmd_jobsub on malformed positional
input is stale — NULLSTR guards added 2025-11-05 already reject it cleanly.
The real residual defect was submit.start_info leaking on all 4 early-return
validation paths; fixed by routing them through a shared `goto cleanup`
(matches the existing goto-clean idiom in queue_ctrl).

bug-1396 (job-count anomaly after cold-restart-all, not yet root-caused):
instrumented test-commit-durability.sh's assert_job_count() to dump the live
joblist and ACKED_FILE ledger on any count mismatch instead of only the
count, per the bug's own recorded next step.

Verified: controller ASAN build + full controller_unit_test green; lib
xcelib_test 285/285 green, 0 ASAN leaks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SDWVNQLKxqTVHh42cH7rV3
2026-07-03 02:40:52 +00:00
..
appimage save works 2026-03-04 18:18:53 +08:00
deploy-ha.sh fix(ha): election-safety hardening — vote gates, restored-vote term, freshness source 2026-06-10 01:25:39 +00:00
go_build add autoscaler and build for go code 2025-12-08 16:19:56 +08:00
test-commit-durability.sh fix: close bug-1401 ctrlstatus leak, bug-1400 jobsub leak; harden bug-1396 harness 2026-07-03 02:40:52 +00:00
test-heartbeat-tolerance.sh test(ha-heartbeat-liveness): SIGSTOP/SIGCONT tolerance integration test (task 4.5) 2026-06-03 04:18:56 +00:00
xce-build.sh feat(xce-build): add non-ASAN debug + release profiles; root-cause bug-1286 with the debug build 2026-06-30 09:15:36 +00:00