8548 want memset_s(3C)

Review Request #640 — Created Aug. 6, 2017 and submitted — Latest diff uploaded

yuripv
illumos-gate
master
8548
df4956e...
general

This adopts the memset_s() implementation from FreeBSD.

Newly added symbols are visible if _STRICT_SYMBOLS is not defined, or __STDC_WANT_LIB_EXT1__ is set to 1 (via __EXT1_VISIBLE).

__STDC_LIB_EXT1__ is not set as we don't implement all bounds-checking functions at the moment.

  • new libc-tests test cases
  • compiled a simple test case on updated system, in turn calling memset() and memset_s() before free() and checked that (both with gcc 4.4.4 and clang 3.8) memset() gets optimized away with -O >= 1, while memset_s() doesn't (exactly what we need)
Loading...