Opened 2 weeks ago
#415 new defect
Bugs identified in archive_aux_.pl1 subroutine
| Reported by: | Jim Lippard | Owned by: | Eric Swenson |
|---|---|---|---|
| Priority: | minor | Milestone: | MR12.9 |
| Component: | Standard Library | Version: | MR12.9 |
| Keywords: | archive, archive_aux_.pl1 | Cc: |
Description
Numbers 33–35 are part of a single numbering across the archive programs; line numbers are those of the MR12.8 source. The test kit (tests.archive) contains an exec_com for the item marked "Test".
Bug 33: a directory in the working directory is treated as a source segment, line 102
For a global replace or update (r, u and variants with no component names), a directory, or a link to one, whose name matches a component is taken as that component's source; the command then reports an error for it. With an archive holding alpha and beta:
copy <seed.txt alpha
create_dir beta
ac r t_ok
archive: This operation is not allowed for a directory. ...>bug33>beta
Expected: directories are not candidate sources, so alpha is replaced and beta is left unchanged without a message. Test: bug33.ec (a directory; the link-to-directory case is by inspection).
Bug 34: free uses an uninitialized area pointer, line 119
The free entry frees the directory listing in (area), where area is based on a pointer set only in the invocation of the listwdir entry, not in this one. Found by inspection.
Bug 35: listwdir returns garbage if hcs_$star_list_ fails, line 75
The entry and name pointers are not initialized, and the entry count is updated even when the call fails, so the caller can receive uninitialized pointers and a nonzero count. Expected: null pointers and a zero count on failure. Found by inspection.
