Project

General

Profile

Feature #8548

want memset_s(3C)

Added by Yuri Pankov over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2017-07-28
Due date:
% Done:

100%

Estimated time:
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 libresslNew2014-05-18

Actions
Related to illumos gate - Bug #9755: bounds checking functions and types should only be visible if __STDC_WANT_LIB_EXT1__ is set to 1Closed2018-08-17

Actions

History

#1

Updated by Yuri Pankov over 2 years ago

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

Updated by Robert Mustacchi over 2 years ago

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

#3

Updated by Yuri Pankov over 2 years 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 over 2 years 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 over 2 years ago

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

Updated by Electric Monk over 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

git commit 00efb5e1437d3912284689f1b0c13190e634e788

commit  00efb5e1437d3912284689f1b0c13190e634e788
Author: Yuri Pankov <yuri.pankov@nexenta.com>
Date:   2018-08-16T17:33:48.000Z

    8548 want memset_s(3C)
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

#7

Updated by Joshua M. Clulow over 1 year ago

  • Related to Bug #9755: bounds checking functions and types should only be visible if __STDC_WANT_LIB_EXT1__ is set to 1 added

Also available in: Atom PDF