Project

General

Profile

Actions

Feature #8548

closed

want memset_s(3C)

Added by Yuri Pankov about 6 years ago. Updated about 5 years 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:
Gerrit CR:
External Bug:

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 libresslNewGarrett D'Amore2014-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 1ClosedYuri Pankov2018-08-17

Actions
Actions #1

Updated by Yuri Pankov about 6 years ago

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

Updated by Robert Mustacchi about 6 years ago

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

Actions #3

Updated by Yuri Pankov about 6 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.

Actions #4

Updated by Yuri Pankov about 6 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.

Actions #5

Updated by Yuri Pankov about 6 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)
Actions #6

Updated by Electric Monk about 5 years 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>

Actions #7

Updated by Joshua M. Clulow about 5 years ago

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

Also available in: Atom PDF