[PATCH] D59597: [scudo][standalone] Add flags & related parsers
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 5 08:22:22 PDT 2019
cryptoad updated this revision to Diff 193884.
cryptoad added a comment.
This new version of the flags parsing departs from the one currently
implemented in sanitizer_common. We avoid dynamic memory allocations
by doing all the parsing in place, and only support boolean and integer
flags (strings would require to be duplicated to have them null
terminated).
This addresses some of the comments from Matt & Mitch:
- no more `map` call for the flags, they are static
- no more placement `new` and sketchy `delete` declaration (even though
those were never destroyed, compiling on Fuchsia required a `delete`
definition that was left empty for the classes)
- no more virtual class and inheritence
This comes with some caveats, like the fact that since we are not
null terminating the strings, displaying a flag (eg: `Printf` of
unknown flags or the like) will output the whole string passed.
I felt it wasn't a big deal.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59597/new/
https://reviews.llvm.org/D59597
Files:
lib/scudo/standalone/CMakeLists.txt
lib/scudo/standalone/flags.cc
lib/scudo/standalone/flags.h
lib/scudo/standalone/flags.inc
lib/scudo/standalone/flags_parser.cc
lib/scudo/standalone/flags_parser.h
lib/scudo/standalone/interface.h
lib/scudo/standalone/tests/CMakeLists.txt
lib/scudo/standalone/tests/flags_test.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59597.193884.patch
Type: text/x-patch
Size: 18645 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190405/c32cbb1e/attachment.bin>
More information about the llvm-commits
mailing list