Feature #8548

want memset_s(3C)

Added by Yuri Pankov 3 months ago. Updated 2 months ago.

Status:In ProgressStart date:2017-07-28
Priority:NormalDue date:
Assignee:Yuri Pankov% Done:

50%

Category:lib - userland libraries
Target version:-
Difficulty:Bite-size Tags:

Description

memset_s is C11 addition, and is already required by some software out there (libressl?).

FreeBSD has recently introduced it, so we can port their implementation.

https://github.com/freebsd/freebsd/commit/4774ca6be082ef7b8f2c2cc8f97f8fbf6bd6f315


Related issues

Related to illumos gate - Feature #4869: need libc secure enhancements for libressl New 2014-05-18

History

#1 Updated by Yuri Pankov 3 months ago

  • Related to Feature #4869: need libc secure enhancements for libressl added

#2 Updated by Robert Mustacchi 3 months ago

Are we going to need to implement the whole of Annex K?

#3 Updated by Yuri Pankov 3 months ago

I think that memset_s() and the constraint handlers that it needs can be done separately (as was done in FreeBSD), and will set a start for other parts.

#4 Updated by Yuri Pankov 3 months ago

Re-reading the standard, looks like we guarantee all of the bounds-checked functions to be available only if we define __STDC_LIB_EXT1__, so with partial implementation we can avoid the definition for the moment.

#5 Updated by Yuri Pankov 2 months ago

  • Status changed from New to In Progress
  • Tags deleted (needs-triage)
  • Category set to lib - userland libraries
  • Difficulty changed from Medium to Bite-size
  • % Done changed from 0 to 50
  • Assignee set to Yuri Pankov

Also available in: Atom