Skip to content

Fix libdecb file I/O and segmented binary handling - #82

Merged
tlindner merged 1 commit into
nitros9project:mainfrom
tlindner:codex/libdecb-bug-fixes
Oct 28, 2026
Merged

tlindner merged 1 commit into
nitros9project:mainfrom
tlindner:codex/libdecb-bug-fixes

Conversation

@tlindner

Copy link
Copy Markdown
Member

Correct four bugs and add regression coverage in the TinyTest harness:

  • Report the full readln byte count when a line crosses granule boundaries.
  • Write the requested byte count when overwriting existing files, and return success when no file extension is needed.
  • Include address $FFFF when initializing and scanning binary concatenation memory so the last byte is preserved, including address wraparound.
  • Skip subsequent binary segments when extracting the first segment so data bytes cannot be mistaken for the execution-address postamble.

Tests cover line contents and positions, persisted overwrites and extensions, binary segment merging and wraparound, and execution-address extraction.

Also ignore AGENTS.md and group the optional debug and AddressSanitizer build settings in build/unix/rules.mak, leaving them disabled by default.

Validation: make -C build/unix succeeded with all 36 tests passing; git diff --check passed. Each new regression failed before its fix.

Correct four bugs and add regression coverage in the TinyTest harness:

- Report the full readln byte count when a line crosses granule boundaries.
- Write the requested byte count when overwriting existing files, and return
  success when no file extension is needed.
- Include address $FFFF when initializing and scanning binary concatenation
  memory so the last byte is preserved, including address wraparound.
- Skip subsequent binary segments when extracting the first segment so data
  bytes cannot be mistaken for the execution-address postamble.

Tests cover line contents and positions, persisted overwrites and extensions,
binary segment merging and wraparound, and execution-address extraction.

Also ignore AGENTS.md and group the optional debug and AddressSanitizer build
settings in build/unix/rules.mak, leaving them disabled by default.

Validation: make -C build/unix succeeded with all 36 tests passing;
git diff --check passed. Each new regression failed before its fix.
@tlindner
tlindner merged commit a0f2b9e into nitros9project:main Oct 28, 2026
6 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