• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kernelite / milo / 46652951882

01 Dec 2026 01:06PM UTC coverage: 53.352% (-0.001%) from 53.353%
46652951882

push

github

web-flow
fix(arch,hal,syscalls): run .init_array and fix virtio binding and mmap errno (#219)

* fix(arch,hal,syscalls): run .init_array and fix virtio binding and mmap errno

Add __init_array_start and __init_array_end section bounds in linker.ld,
execute constructors in run_init_array() during kmain(), and construct
VirtioNetDevice instances via placement-new in platform_net.cpp so virtual
dispatch on NetworkDevice does not fault. Bind primary block devices through
VirtioMmioBus::bind_device() in platform_block.cpp, and reject negative
file descriptors with ERR_EINVAL before checking INT32_MAX on non-anonymous
sys_mmap calls so invalid fd tests return -22.

* fix(syscalls): reject negative fd with EINVAL in non-anonymous sys_mmap

Check `static_cast<int64_t>(raw_fd) < 0` before `raw_fd > INT32_MAX`
when `MAP_ANONYMOUS` is not set so negative file descriptors such as
`fd = -1` return `-EINVAL` (-22) rather than `-EBADF` (-9)[cite: 7, 19].

Add -device virtio-gpu-device to QEMUFLAGS in Makefile so `make run` and
`make debug` enumerate and bind the VirtIO 2D GPU scanout device during
boot, enabling `test gpu` and `test all` to pass by default.

2931 of 6775 branches covered (43.26%)

Branch coverage included in aggregate %.

1 of 2 new or added lines in 1 file covered. (50.0%)

6013 of 9989 relevant lines covered (60.2%)

3286.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.79
/kernel/syscalls/MemorySyscalls.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc