Work around changes in newer versions of glibc
[model-checker.git] / main.cc
diff --git a/main.cc b/main.cc
index 127ffd160ff8df930d30500b1944ec2a9b107b00..502f499eff9cb2de956256bb6f24b84080e600e0 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -141,9 +141,9 @@ static void parse_options(struct model_params *params, int argc, char **argv)
                {"enabled", required_argument, NULL, 'e'},
                {"bound", required_argument, NULL, 'b'},
                {"verbose", optional_argument, NULL, 'v'},
-               {"uninitialized", optional_argument, NULL, 'u'},
-               {"analysis", optional_argument, NULL, 't'},
-               {"options", optional_argument, NULL, 'o'},
+               {"uninitialized", required_argument, NULL, 'u'},
+               {"analysis", required_argument, NULL, 't'},
+               {"options", required_argument, NULL, 'o'},
                {"maxexecutions", required_argument, NULL, 'x'},
                {0, 0, 0, 0} /* Terminator */
        };
@@ -231,6 +231,8 @@ static void install_trace_analyses(ModelExecution *execution)
                TraceAnalysis * ta=(*installedanalysis)[i];
                ta->setExecution(execution);
                model->add_trace_analysis(ta);
+               /** Call the installation event for each installed plugin */
+               ta->actionAtInstallation();
        }
 }
 
@@ -268,6 +270,18 @@ int main(int argc, char **argv)
        main_argc = argc;
        main_argv = argv;
 
+       /*
+        * If this printf statement is removed, CDSChecker will fail on an
+        * assert on some versions of glibc.  The first time printf is
+        * called, it allocated internal buffers.  We can't easily snapshot
+        * libc since we also use it.
+        */
+
+       printf("CDSChecker\n"
+                                "Copyright (c) 2013 Regents of the University of California. All rights reserved.\n"
+                                "Distributed under the GPLv2\n"
+                                "Written by Brian Norris and Brian Demsky\n\n");
+
        /* Configure output redirection for the model-checker */
        redirect_output();