chore(buglog): harness batch fixed (da1a663f): bug-1574/1702/1703/1705/1707-1710/1712/1777/1793/1796/1797

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-09-28 04:17:31 +00:00
parent da1a663f05
commit 8cadeeb2d0
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
14 changed files with 221 additions and 156 deletions

View file

@ -1,16 +1,17 @@
---
id: "bug-1705"
status: "open"
status_updated: "2026-09-24"
status_note: "xce_test jobsub -x exdata overwritten by build_job_exdata and leaked"
status: "fixed"
status_updated: "2026-09-28"
status_note: ""
component: "controller"
severity: "leak"
timestamp: "2026-08-26T09:32:18Z"
last_seen: "2026-09-19T09:00:00Z"
occurrences: 1
files: ["src/controller/testsuite/test.c:2243-2245 (-x parsing)", ":2181-2195 (build_job_envs unconditional overwrite)", ":2336 (unconditional call site)", "USAGE_JOBSUB at :484-485"]
files: ["src/harness/test.c"]
tags: ["controller", "testsuite", "xce_test", "cmd_jobsub", "dead-flag", "silent-data-loss", "memory-leak", "cli-ux-audit"]
related: []
fix_commits: ["da1a663f"]
legacy: true
---
@ -29,10 +30,12 @@ _Not recorded (migrated from buglog.json)._
build_job_exdata()/build_job_envs() have no guard for an already-non-NULL exdata field before overwriting it.
## Fix
NOT YET FIXED. Recommended: skip build_job_exdata() when submit.start_info->exdata is already non-NULL (from -x), and free the old pointer before any legitimate reassignment.
The default exdata comes from cmdutil_default_exdata(), which only builds the PATH JSON when exdata is still NULL, so -x's value is kept and no longer leaked; a repeated -x frees the earlier copy. cmd_jobsub's cleanup also frees execuser/exechome/execcwd, which leaked on every call.
## Verification
_Not recorded (migrated from buglog.json)._
- Test: test_default_exdata_keeps_caller_value and test_default_exdata_builds_path_json_when_unset in src/harness/testsuite/test_cmdutil.c; the old build_job_exdata() overwrote exdata unconditionally, which the first test forbids
- Suites: harness 6/6 (asan): harness_unit_test 141/0, cmdutil 14/0, resval_typeresolve 7/0, joblist_display 22/0, join_worker_args 7/0, listrow_json 12/0
- Live: n/a; xce_test is a client tool and every case above runs without a controller
## References
_Not recorded (migrated from buglog.json)._