std.c: Refactor, bring semantics closer to spec.

Small refactor replacing the pattern of verifying inputs in
safe equivalents of stdlib functions with a CHECK-like macro
which adheres to the C11 semantics of filling the destination
buffer when a constraint is not satisfied at runtime.

Semantic changes:

memcpy_s: More permissive memory ranges. Used to check that source does
not overlap with the entire destination buffer, when only the first
`count` bytes matter.

memcpy_s: Used to allow `dest==src`. Safe under our implementation in
aarch64 but not allowed under C11.

strlen_s: Should return 'strsz' if NULL character not found.

Change-Id: If483a97e6ee1c64c7f2afed9a0af1d3087da7002
2 files changed
tree: 79e6af188846dcf2c4f54c37b517e78ce1b745a4
  1. .vscode/
  2. build/
  3. docs/
  4. driver/
  5. inc/
  6. kokoro/
  7. project/
  8. src/
  9. test/
  10. third_party/
  11. .clang-format
  12. .clang-tidy
  13. .gitignore
  14. .gitmodules
  15. .gn
  16. AUTHORS
  17. BUILD.gn
  18. CONTRIBUTING.md
  19. LICENSE
  20. Makefile
  21. README.md
README.md

Hafnium

Hafnium is a hypervisor, initially supporting aarch64 (64-bit ARMv8 CPUs).

Get in touch and keep up-to-date at hafnium-discuss@googlegroups.com.

Getting started

To jump in and build Hafnium, follow the getting started instructions.

If you want to contribute to the project, see details of how we accept contributions.

Documentation

More documentation is available on: