Back to RTEMS Project
GSoC 2026

Add Support for C11 Annex K Bounds-Checking Functions in RTEMS

RTEMS currently lacks C11 Annex K bounds-checking functions (strcpy_s, memcpy_s, sprintf_s and ~45 others) which provide runtime buffer-size validation critical for safety-critical embedded systems. Without these, RTEMS developers writing software for spacecraft, medical devices, and automotive controllers are forced to use unsafe standard functions or write their own wrappers — neither is acceptable for safety-critical code. This project packages safeclib (rurban/safeclib) through the RTEMS Source Builder (RSB) so any RTEMS BSP can access these functions via -lsafec, directly strengthening memory safety across all RTEMS applications. The approach uses pkg-config for BSP-specific flag detection and librtemsdefaultconfig.a for configure-time link tests. Deliverables include a working RSB recipe, full test suite validation (~126 tests) under QEMU SPARC emulation, all ~45 Annex K functions documented in the RTEMS POSIX Compliance Guide, and a release notes entry.

Project details

Contributor

Yash Bhiwania

Mentors

Not available

Technologies

Not listed in the archive