Fix unmatching ASan runtime flag for init-order checking exposed by r178158. Add a test for r178158.

llvm-svn: 178229
This commit is contained in:
Alexey Samsonov 2013-03-28 09:11:20 +00:00
parent ac83282665
commit e586170e86
2 changed files with 2 additions and 1 deletions

View File

@ -96,7 +96,7 @@ static void ParseFlagsFromString(Flags *f, const char *str) {
ParseFlag(str, &f->debug, "debug");
ParseFlag(str, &f->report_globals, "report_globals");
ParseFlag(str, &f->check_initialization_order, "initialization_order");
ParseFlag(str, &f->check_initialization_order, "check_initialization_order");
ParseFlag(str, &f->malloc_context_size, "malloc_context_size");
CHECK((uptr)f->malloc_context_size <= kStackTraceMax);

View File

@ -63,6 +63,7 @@ TEST(SanitizerCommon, StrFlags) {
TestStrFlag("", "--flag_name='abc zxc'", "abc zxc");
TestStrFlag("", "--flag_name='abc zxcc'", "abc zxcc");
TestStrFlag("", "--flag_name=\"abc qwe\" asd", "abc qwe");
TestStrFlag("", "other_flag_name=zzz", "");
}
static void TestTwoFlags(const char *env, bool expected_flag1,