[compiler-rt] r214421 - [Sanitizer] Don't try to parse unspecified suppressions file
Alexey Samsonov
vonosmas at gmail.com
Thu Jul 31 12:06:48 PDT 2014
Author: samsonov
Date: Thu Jul 31 14:06:47 2014
New Revision: 214421
URL: http://llvm.org/viewvc/llvm-project?rev=214421&view=rev
Log:
[Sanitizer] Don't try to parse unspecified suppressions file
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_suppressions.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_suppressions.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_suppressions.cc?rev=214421&r1=214420&r2=214421&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_suppressions.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_suppressions.cc Thu Jul 31 14:06:47 2014
@@ -78,12 +78,14 @@ SuppressionContext *SuppressionContext::
void SuppressionContext::Init() {
CHECK(!suppression_ctx);
suppression_ctx = new(placeholder) SuppressionContext;
+ if (common_flags()->suppressions[0] == '\0')
+ return;
char *suppressions_from_file;
uptr buffer_size;
uptr contents_size =
ReadFileToBuffer(common_flags()->suppressions, &suppressions_from_file,
&buffer_size, 1 << 26 /* max_len */);
- if (common_flags()->suppressions[0] && contents_size == 0) {
+ if (contents_size == 0) {
Printf("%s: failed to read suppressions file '%s'\n", SanitizerToolName,
common_flags()->suppressions);
Die();
More information about the llvm-commits
mailing list