Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#4998 new enhancement

Add support for C11 Annex K Bounds Checking Functions

Reported by: Joel Sherrill Owned by:
Priority: normal Milestone:
Component: tool/newlib Version:
Severity: normal Keywords: C11, SoC, newlib, medium, API
Cc: Blocked By:
Blocking:

Description (last modified by Gedare Bloom)

Description

C11 (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf) Annex K defines a set of alternatives to many Standard C Library functions that perform bounds checking. It is desirable to support these in RTEMS.

Since these functions are prototyped in standard C header files, it would be nice to have these merged into newlib and prototyped in the header files included there. Prototypes of Annex K functions need to be guarded by the _STDC_LIB_EXT1_ cpp define. That would be defined by OS in sys/features.h

There is at least one implementation or possibly forks of one implementation based on there being multiple "safelibc" projects on github.com with permissive licenses. One of the first steps in this project is to determine which upstream project is the official version and should be the one used for the source. The following repositories as a minimum have been identified:

Since the goal is to have the code merged into newlib, there will need to be a list of files and git hash from the source repository so it is possible to easily track updates.

Mentors

Mentors: Joel Sherrill, Gedare Bloom, and possibly others

Skills

C, autoconf

Difficulty

Moderate

Change History (1)

comment:1 Changed on 02/29/24 at 23:04:50 by Gedare Bloom

Description: modified (diff)
Keywords: API added
Note: See TracTickets for help on using tickets.