RTEMS | Implement C11 Annex K (Bounds-checking interfaces): memset_s proof of concept (#5434)
YASH BHIWANIA (@Yash)
gitlab at rtems.org
Sat Jan 24 14:17:03 UTC 2026
YASH BHIWANIA created an issue: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5434
## Summary
Hi everyone,
I've been looking through the standard library support and noticed that RTEMS is currently missing the C11 Annex K bounds-checking interfaces (functions like `memset_s`, `memcpy_s`, `strcpy_s`, etc.).
I'm interested in implementing these as part of a GSoC 2026 proposal to improve standards compliance and security.
**Current Progress:** I've written a proof-of-concept for `memset_s` that adheres to the standard, specifically handling:
* Runtime constraints (NULL pointers, size limits).
* `RSIZE_MAX` checks.
* Using `volatile` to prevent dead store elimination (as required for security).
I plan to submit a Merge Request for just `memset_s` shortly. I'd love to use that as a baseline to get feedback on the coding style and approach before I tackle the rest of the functions in my proposal.
Thanks!
## Steps to reproduce
<!--Pre-set options
- milestone-->
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5434
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260124/77c00215/attachment.htm>
More information about the bugs
mailing list