RTEMS | Implement C11 Annex K (Bounds-checking interfaces): memset_s proof of concept (#5434)
YASH BHIWANIA (@Yash)
gitlab at rtems.org
Fri Jan 30 20:32:42 UTC 2026
YASH BHIWANIA commented on a discussion: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5434#note_140492
Hi @joel @chris,
Just wanted to give a quick update on this!
Following the plan to use `rurban/safeclib`, I spent the last few days attempting a manual cross-compilation for the `sparc-rtems7-erc32` BSP to see if it was feasible. I’m happy to report that I got it working—I successfully built the static library (`libsafec.a`) using the RTEMS 7 toolchain.
I’ve documented the exact steps, build logs, and the resulting binary in a "lab notebook" repo here: https://github.com/YASHBHIWANIA/rtems-safeclib-poc
It wasn't exactly plug-and-play, but I identified the specific hurdles we'll need to handle in the RSB recipe:
1. **Configure Tests:** The autotools tests were failing initially because they lacked the RTEMS configuration table. I solved this by injecting a pre-compiled `rtems_config.o` into the linker flags during the configure step.
2. **Float Support:** I had to use `--disable-float` because of some `isinfl` conflicts with the current Newlib math library on this BSP.
3. **Upstream Bugs:** I hit a few build failures with `-Werror` due to a missing label in `vswprintf_s.c` and an unused variable in `snwprintf_s.c`. I created patches for these which are also in the repo above.
Now that I have the build flags and patches figured out, I'm going to start drafting my GSoC proposal to automate this process in the RSB.
Thanks, Yash Bhiwania
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5434#note_140492
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/20260130/65ae802c/attachment.htm>
More information about the bugs
mailing list