Skip to content

Conversation

@HeatCrab
Copy link
Collaborator

@HeatCrab HeatCrab commented Feb 3, 2026

The heap allocation syscall had an implementation incompatible with the kernel's fixed-size heap design, changed to a proper stub to match other unsupported POSIX syscalls. Also added file descriptor validation in I/O syscalls to reject unsupported values beyond standard streams.


Summary by cubic

Align POSIX syscall behavior with the fixed-heap kernel by stubbing sbrk and tightening I/O file descriptor validation. This prevents unsupported memory growth and rejects non-standard FDs in read/write.

  • Bug Fixes
    • Replace _sbrk with a stub that returns -1 and sets ENOMEM to match unsupported syscall handling.
    • Validate _read/_write file descriptors to only allow 0–2; invalid values return EBADF.

Written for commit 7baf078. Summary will update on new commits.

The heap allocation syscall had an implementation incompatible with
the kernel's fixed-size heap design, changed to a proper stub to match
other unsupported POSIX syscalls. Also added file descriptor validation
in I/O syscalls to reject unsupported values beyond standard streams.
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@jserv jserv merged commit 37f9906 into sysprog21:main Feb 4, 2026
7 checks passed
@jserv
Copy link
Contributor

jserv commented Feb 4, 2026

Thank @HeatCrab for contributing!

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.

2 participants