forked from OSchip/llvm-project
4c39f34199
Summary: Previously it wasn't obvious what the default value of various sanitizer options were. A very close approximation of the "default values" for the options are the current value of the options at the time of printing the help output. In the case that no other options are provided then the current values are the default values (apart from `help`). ``` ASAN_OPTIONS=help=1 ./program ``` This patch causes the current option values to be printed when the `help` output is enabled. The original intention for this patch was to append `(Default: <value>)` to an option's help text. However because this is technically wrong (and misleading) I've opted to append `(Current Value: <value>)` instead. When trying to implement a way of displaying the default value of the options I tried another solution where the default value used in `*.inc` files were used to create compile time strings that where used when printing the help output. This solution was not satisfactory for several reasons: * Stringifying the default values with the preprocessor did not work very well in several cases. Some options contain boolean operators which no amount of macro expansion can get rid of. * It was much more invasive than this patch. Every sanitizer had to be changed. * The settings of `__<sanitizer>_default_options()` are ignored. For those reasons I opted for the solution in this patch. rdar://problem/42567204 Reviewers: kubamracek, yln, kcc, dvyukov, vitalybuka, cryptoad, eugenis, samsonov Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D69546 |
||
---|---|---|
.. | ||
tests | ||
.clang-format | ||
CMakeLists.txt | ||
msan.cpp | ||
msan.h | ||
msan.syms.extra | ||
msan_allocator.cpp | ||
msan_allocator.h | ||
msan_blacklist.txt | ||
msan_chained_origin_depot.cpp | ||
msan_chained_origin_depot.h | ||
msan_flags.h | ||
msan_flags.inc | ||
msan_interceptors.cpp | ||
msan_interface_internal.h | ||
msan_linux.cpp | ||
msan_new_delete.cpp | ||
msan_origin.h | ||
msan_poisoning.cpp | ||
msan_poisoning.h | ||
msan_report.cpp | ||
msan_report.h | ||
msan_thread.cpp | ||
msan_thread.h |