[PATCH] D59262: [scudo][standalone] Add string utility functions

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 09:11:35 PDT 2019


cryptoad updated this revision to Diff 191106.
cryptoad marked 5 inline comments as done.
cryptoad added a comment.

Following Matt's comments, I had a look at various libc implementations
and the ctype function `isspace`, `isdigit`, `tolower` all appear to be
safe, so use them instead of our own.
`strtol` & co. should also do (Windows might be using some multibyte to
widechar conversion function which would use dynamic allocation, but we
don't support Windows so we should be good).
Add a test that attempts to overflow a `ScopedString` with different
variations of `append`.


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59262/new/

https://reviews.llvm.org/D59262

Files:
  lib/scudo/standalone/CMakeLists.txt
  lib/scudo/standalone/fuchsia.cc
  lib/scudo/standalone/linux.cc
  lib/scudo/standalone/string_utils.cc
  lib/scudo/standalone/string_utils.h
  lib/scudo/standalone/tests/CMakeLists.txt
  lib/scudo/standalone/tests/strings_test.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59262.191106.patch
Type: text/x-patch
Size: 15623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190318/6caa4263/attachment.bin>


More information about the llvm-commits mailing list