Skip to content

Fix three decb bugs: raw kill, case-blind copy and rename - #113

Merged
tlindner merged 4 commits into
nitros9project:mainfrom
tlindner:fix-decb-bugs
Nov 14, 2026
Merged

tlindner merged 4 commits into
nitros9project:mainfrom
tlindner:fix-decb-bugs

Conversation

@tlindner

Copy link
Copy Markdown
Member
  • kill on a raw path ("image,") succeeded and erased the first directory entry, leaking its granules. It is now refused with EOS_BPNAM.
  • copy's duplicate check compared names with case, though lookups ignore it, so copying to foo.txt over FOO.TXT made a second entry that could not be read back. It now refuses (or with -r replaces) the file.
  • rename looked for its file with case, so "rename img,foo.txt NEW" failed with EOS_BPNAM for FOO.TXT. It now renames the entry _decb_open found, and its name clash check ignores case while letting a file change only the case of its own name.

tlindner and others added 4 commits November 13, 2026 11:15
- kill on a raw path ("image,") succeeded and erased the first directory
  entry, leaking its granules.  It is now refused with EOS_BPNAM.
- copy's duplicate check compared names with case, though lookups ignore
  it, so copying to foo.txt over FOO.TXT made a second entry that could
  not be read back.  It now refuses (or with -r replaces) the file.
- rename looked for its file with case, so "rename img,foo.txt NEW"
  failed with EOS_BPNAM for FOO.TXT.  It now renames the entry
  _decb_open found, and its name clash check ignores case while letting
  a file change only the case of its own name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
GCC on Linux thought a command name could be 1023 bytes and overflow the
64-byte arguments buffer, and -Werror failed the build (main fails the
same way since nitros9project#107). The lengths are now checked, as in os9commandtest,
which also fails the test if the arguments are ever cut off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Since the CI runner moved to ubuntu-26.04, the mingw-w64 cross compiler
checks printf formats against the old msvcrt rules, which don't know
%zx, and -Werror failed the Windows package in cocodump.c. Defining
__USE_MINGW_ANSI_STDIO=1 for WIN builds gives the C99 printf, so the
%zu and %lld used across the tools work and are checked as such.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Windows package still failed: the CI runner's move to ubuntu-26.04
brought mingw-w64 13 headers, under which GCC checks fprintf as ms_printf
even with __USE_MINGW_ANSI_STDIO=1, and ms_printf knows h, l, ll, L, I32,
I64 and I but not z. The dump offsets and the extra byte count are now
cast to unsigned long long and printed with %llx and %llu, which every
compiler here accepts, and the ineffective define is taken back out.
Dump output is unchanged in every format.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tlindner
tlindner merged commit 5db1cb2 into nitros9project:main Nov 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant