chore(wolf): checkpoint buglog.json (1057 bugs)

This commit is contained in:
Rongsong Shen 2026-08-26 14:30:13 +00:00
parent 9de4db95d3
commit b3c462ede4
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2

View file

@ -19542,6 +19542,27 @@
],
"occurrences": 1,
"last_seen": "2026-08-26T20:15:00Z"
},
{
"id": "bug-1716",
"timestamp": "2026-08-26T14:25:00Z",
"error_message": "test_rcfile_load_directory_path_warns_and_returns_0:FAIL: Expected TRUE Was FALSE (stderr capture was empty -- no warning printed) when rcfile_load() opened a directory path",
"file": "src/controller/testsuite/rcfile.c",
"root_cause": "On this platform (glibc/Linux), fopen(path, \"r\") SUCCEEDS for a directory path -- it does not return NULL/set errno the way the design doc's error-handling section (and a naive reading of 'the file could not be opened for another reason') implied. The open failure only surfaces on the FIRST READ: getline() returns -1 with errno==EISDIR and ferror(f) set (feof(f) stays 0). rcfile_load()'s original implementation only checked `if (!f)` right after fopen() and had no post-loop check on the stream's error state, so a directory path silently produced rc=0 with zero lines processed and NO warning ever printed -- functionally 'safe' (no crash, no runner call) but silently violating the design's documented 'present but unreadable: print one stderr warning' contract for exactly this case.",
"fix": "Added a check after the getline() loop in rcfile_load(): `if (rc == 0 && ferror(f)) { fprintf(stderr, ...); }` -- prints the same warning message used for the fopen()-failure branch, keyed off ferror(f) rather than assuming the failure is only detectable at fopen() time. Confirmed live via a small standalone C repro (fopen(\"/tmp\",\"r\") then fread/getline) that fopen() returns a valid FILE* for a directory and the read call is what fails with EISDIR + ferror set.",
"tags": [
"rcfile",
"fopen",
"EISDIR",
"directory",
"getline",
"xce-test-rc-file",
"controller-testsuite",
"stderr-warning"
],
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-08-26T14:25:00Z"
}
]
}