Repository navigation
os9: bugs fixed - #100
Merged
Merged
os9: bugs fixed#100
Conversation
Add "os9 files mame.dmk" and "os9 clusters mame.dmk", written by OS-9 Level Two under MAME. Files hold a pattern that tests can recompute, and what the tests expect of directories, segments and free space is what OS-9 itself reported. Comments in librbftest.c describe how each disk was made. The first has edge sizes, fragmented files, a file at the segment limit, deleted and reused directory slots, a directory with two segments, and a range of attributes and names. The second has 2-sector clusters. Fix what they found: os9 free overstated the largest free block, since the run counter only reset when a run set a new maximum. os9 dir -e stopped silently at a file with no permissions. It now reads the file descriptor by LSN, and reports one it cannot read, with a failing exit status. os9 fstat and _os9_gs_fd_pathlist now read that file too. Writing could add a 48th segment, where RBF refuses with E$SLF. Deleting a file lost a cluster when a segment started inside one, as RBF's first segments do. Truncating kept more than RBF does on such a file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
OS-9 stops a file at 47 segments, but follows a 48th if a disk has one, and its dcheck says such a disk is intact. Ours read past the file descriptor for a 49th segment, and reported a bad one. Test files with a 48th segment against what Tandy's OS-9 did with one. It read the file back and refused to add a sector with E$SLF. Its del leaves the 48th segment allocated, where ours frees it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GCC's format-truncation warning stopped the Linux build at this snprintf. A pathlist too long would have opened the wrong file, so fail the test instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The secondary bitmap was a byte short whenever the sector count was not one less than a multiple of 8, so the last sectors were tracked past the end of it, in memory that was not cleared. On Linux that made dcheck report disks with free sectors there as not intact. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
os9 free: overstated the largest free block, because its run counter only reset when a run set a new maximum.
os9 dir -e: stopped listing silently, with exit status 0, at a file with no permissions.
os9 fstat and _os9_gs_fd_pathlist: refused to read the file descriptor of a file with no permissions.
os9 file writes: could add a 48th segment, which OS-9 refuses to create with E$SLF.
os9 del: left a cluster allocated when a file’s segment started partway through a cluster, as RBF’s first segments do on disks with larger clusters.
File truncation in librbf: kept more sectors than RBF does when a file’s first segment started partway through a cluster.
os9 dcheck segment loops: read past the file descriptor on a full 48-segment list and wrongly reported the disk as not intact.
os9 dcheck bitmap: allocated its secondary bitmap a byte short, so leftover heap memory could make it report a good disk as not intact.