Repository navigation
v0.5.1: Progressive Coreutils + Pipe Fix + Tri-Arch Clippy Clean
VeridianOS v0.5.1
Release Date: February 23, 2026
Previous Release: v0.5.0 (February 21, 2026)
Summary
VeridianOS v0.5.1 delivers 6 progressively complex POSIX coreutils that exercise the self-hosted compilation pipeline end-to-end, a critical pipe fd corruption fix, ~490 lines of diagnostic trace removal (38% boot log reduction), and zero clippy warnings across all 3 architectures (x86_64, AArch64, RISC-V).
This release validates that the kernel's syscall infrastructure, libc, and GCC 14.2 cross-compilation pipeline work together for non-trivial programs including multi-process pipelines with fork/exec/pipe/waitpid.
Highlights
Progressive Coreutils (6 new programs, ~884 lines of C)
Six programs of increasing syscall complexity, cross-compiled with the GCC 14.2 toolchain and verified running on VeridianOS:
| Program | Lines | Complexity | Syscalls Exercised |
|---|---|---|---|
echo |
36 | Argv + write | write |
cat |
71 | File I/O loop | open, read, write, close |
wc |
125 | Char classification + getopt + printf | open, read, write, close + ctype + getopt |
ls |
174 | Directory traversal + stat + qsort | open, getdents64, stat, write, close + qsort |
sort |
184 | Dynamic memory + custom comparators | open, read, write, close + malloc/realloc + qsort |
pipeline_test |
294 | Capstone: fork/exec/pipe/waitpid | fork, execve, waitpid, pipe, dup2, open, read, write, close, unlink |
All 6 programs pass their self-tests on VeridianOS:
ECHO_PASS
CAT_PASS
3 5 24 /usr/src/wc_test.txt
WC_PASS
LS_PASS
SORT_PASS
SUBTEST1_PASS
SUBTEST2_PASS
SUBTEST3_PASS
PIPELINE_PASS
Critical Bug Fix: sys_pipe2 fd Corruption
Root cause: sys_pipe2() wrote pipe file descriptor values as usize (8 bytes on x86_64) to the user-space buffer, but C pipe(int pipefd[2]) expects int (4 bytes). On little-endian x86_64, writing usize=3 at offset 0 produces [03,00,00,00,00,00,00,00]; the C code reads pipefd[1] from bytes 4-7 (upper half of first usize = 0), causing the write end of the pipe to be lost.
Fix: Changed buffer write from *mut usize to *mut i32 with as i32 casts. Changed validate_user_buffer size from 2 * size_of::<usize>() to 2 * size_of::<i32>().
Tri-Architecture Clippy Clean
SerialConsoleNode::read() in loader.rs had serial polling logic inside #[cfg(target_arch = "x86_64")] blocks interleaved with a #[cfg(not(...))] early return inside a loop/for, producing 5 clippy errors on AArch64 and RISC-V. Restructured to use top-level #[cfg] blocks: x86_64 gets the full COM1 serial polling loop; non-x86_64 gets a clean Ok(0) return.
Result: All 3 architectures now pass cargo clippy -- -D warnings with zero errors and zero warnings.
Diagnostic Trace Cleanup
Removed ~490 lines of development-time diagnostic traces across 5 kernel source files. Boot log reduced from 909 to 566 lines (38% reduction). Removed traces include:
[FORK],[FORK-FT]clone/fd-table dumps[CRE]A-through-I bisect markers[SYS_EXEC]verbose path/argv/envp dumpsSC[pid]per-syscall entry traces[OPEN],[CREAT],[CL],[RD],[SK],[STAT],[ACCESS]filesystem traces
Essential lifecycle markers preserved.
Build Verification
| Architecture | Clippy | Build | Boot | Tests |
|---|---|---|---|---|
| x86_64 | 0 warnings | OK | Stage 6 BOOTOK | 29/29 |
| AArch64 | 0 warnings | OK | Stage 6 BOOTOK | 29/29 |
| RISC-V 64 | 0 warnings | OK | Stage 6 BOOTOK | 29/29 |
cargo fmt --all -- --check: clean- All 6 coreutils cross-compile and pass self-tests
- All 5 self-hosted compilation tests pass (SELF_HOSTED_PASS, STDIO_PASS, STDLIB_PASS, STRING_PASS, COMPLEX_SELFHOST_PASS)
Files Changed
9 commits since v0.5.0 (8 unpushed + 1 release commit)
| Stat | Count |
|---|---|
| Files changed | 83 |
| Insertions | +10,926 |
| Deletions | -699 |
| New C source files | 6 (coreutils) |
Key Files
| File | Change |
|---|---|
userland/coreutils/echo.c |
NEW: echo implementation |
userland/coreutils/cat.c |
NEW: cat implementation |
userland/coreutils/wc.c |
NEW: wc implementation |
userland/coreutils/ls.c |
NEW: ls implementation |
userland/coreutils/sort.c |
NEW: sort implementation |
userland/coreutils/pipeline_test.c |
NEW: capstone fork/exec/pipe/waitpid test |
kernel/src/syscall/filesystem.rs |
sys_pipe2 usize->i32 fix + diagnostic cleanup |
kernel/src/userspace/loader.rs |
SerialConsoleNode tri-arch fix + fd 0/1/2 refactor |
kernel/src/bootstrap.rs |
Coreutils boot test dispatch |
scripts/build-selfhost-rootfs.sh |
Cross-compile coreutils + test data files |
Upgrade Notes
No breaking changes. Drop-in replacement for v0.5.0. The pipe fd fix resolves a data corruption issue in any user-space program calling pipe() on x86_64.
Full Changelog
See CHANGELOG.md for complete details.