summaryrefslogtreecommitdiff
path: root/lib/msan/msan.cc
diff options
context:
space:
mode:
authorSergey Matveev <earthdok@google.com>2013-12-05 12:04:51 +0000
committerSergey Matveev <earthdok@google.com>2013-12-05 12:04:51 +0000
commit32bb25a810ce518282d68b342f8df2b50f496188 (patch)
treea29d9fdad7b7820f5193f2e39e432b58e69dceee /lib/msan/msan.cc
parent42a6725e69355e42c85b8748391aee67bf00352e (diff)
[sanitizer] Introduce VReport and VPrintf macros and use them in sanitizer code.
Instead of "if (common_flags()->verbosity) Report(...)" we now have macros. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@196497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan.cc')
-rw-r--r--lib/msan/msan.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/msan/msan.cc b/lib/msan/msan.cc
index 890a5d93f..72c9a2ea1 100644
--- a/lib/msan/msan.cc
+++ b/lib/msan/msan.cc
@@ -307,21 +307,19 @@ void __msan_init() {
if (MSAN_REPLACE_OPERATORS_NEW_AND_DELETE)
ReplaceOperatorsNewAndDelete();
if (StackSizeIsUnlimited()) {
- if (common_flags()->verbosity)
- Printf("Unlimited stack, doing reexec\n");
+ VPrintf(1, "Unlimited stack, doing reexec\n");
// A reasonably large stack size. It is bigger than the usual 8Mb, because,
// well, the program could have been run with unlimited stack for a reason.
SetStackSizeLimitInBytes(32 * 1024 * 1024);
ReExec();
}
- if (common_flags()->verbosity)
- Printf("MSAN_OPTIONS: %s\n", msan_options ? msan_options : "<empty>");
+ VPrintf(1, "MSAN_OPTIONS: %s\n", msan_options ? msan_options : "<empty>");
msan_running_under_dr = IsRunningUnderDr();
__msan_clear_on_return();
- if (__msan_get_track_origins() && common_flags()->verbosity > 0)
- Printf("msan_track_origins\n");
+ if (__msan_get_track_origins())
+ VPrintf(1, "msan_track_origins\n");
if (!InitShadow(/* prot1 */ false, /* prot2 */ true, /* map_shadow */ true,
__msan_get_track_origins())) {
// FIXME: prot1 = false is only required when running under DR.
@@ -345,8 +343,7 @@ void __msan_init() {
GetThreadStackTopAndBottom(/* at_initialization */true,
&__msan_stack_bounds.stack_top,
&__msan_stack_bounds.stack_bottom);
- if (common_flags()->verbosity)
- Printf("MemorySanitizer init done\n");
+ VPrintf(1, "MemorySanitizer init done\n");
msan_init_is_running = 0;
msan_inited = 1;
}