summaryrefslogtreecommitdiff
path: root/lib/msan/msan.cc
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-01-02 09:59:38 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-01-02 09:59:38 +0000
commitee2d9890ccbda9ef229eeacc8ede3dd365284f4c (patch)
tree61127c2352ab74528d01fcbf2853ece9ada6eec3 /lib/msan/msan.cc
parent45f2ae8d28fc3cfc5d7f1da604fa620c3e09a809 (diff)
Revert r224736: "[Sanitizer] Make CommonFlags immutable after initialization."
We've got some internal users that either aren't compatible with this or have found a bug with it. Either way, this is an isolated cleanup and so I'm reverting it to un-block folks while we investigate. Alexey and I will be working on fixing everything up so this can be re-committed soon. Sorry for the noise and any inconvenience. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan.cc')
-rw-r--r--lib/msan/msan.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/msan/msan.cc b/lib/msan/msan.cc
index 4925619ec..546ffa719 100644
--- a/lib/msan/msan.cc
+++ b/lib/msan/msan.cc
@@ -144,17 +144,14 @@ static void ParseFlagsFromString(Flags *f, const char *str) {
}
static void InitializeFlags(Flags *f, const char *options) {
+ CommonFlags *cf = common_flags();
SetCommonFlagsDefaults();
- {
- CommonFlags cf = *common_flags();
- cf.external_symbolizer_path = GetEnv("MSAN_SYMBOLIZER_PATH");
- cf.malloc_context_size = 20;
- cf.handle_ioctl = true;
- // FIXME: test and enable.
- cf.check_printf = false;
- cf.intercept_tls_get_addr = true;
- OverrideCommonFlags(cf);
- }
+ cf->external_symbolizer_path = GetEnv("MSAN_SYMBOLIZER_PATH");
+ cf->malloc_context_size = 20;
+ cf->handle_ioctl = true;
+ // FIXME: test and enable.
+ cf->check_printf = false;
+ cf->intercept_tls_get_addr = true;
internal_memset(f, 0, sizeof(*f));
f->poison_heap_with_zeroes = false;