From ee2d9890ccbda9ef229eeacc8ede3dd365284f4c Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 2 Jan 2015 09:59:38 +0000 Subject: 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 --- lib/msan/msan.cc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'lib/msan/msan.cc') 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; -- cgit v1.2.3