ruby: reordered Debug and RubyConfig::init to fix segfault
authorPolina Dudnik <pdudnik@gmail.com>
Mon, 11 May 2009 17:38:46 +0000 (10:38 -0700)
committerPolina Dudnik <pdudnik@gmail.com>
Mon, 11 May 2009 17:38:46 +0000 (10:38 -0700)
due to uninitialized output file pointer.

src/mem/ruby/init.cc

index ae81dfc5712f2ab770ffdb8ba63e88da5994e10a..6e29b1a416ea94d16930c8f779156d63455210b4 100644 (file)
@@ -84,12 +84,12 @@ void init_simulator()
 
     cout << "Ruby Timing Mode" << endl;
 
-    RubyConfig::init();
 
     g_debug_ptr = new Debug( DEBUG_FILTER_STRING,
                              DEBUG_VERBOSITY_STRING,
                              DEBUG_START_TIME,
                              DEBUG_OUTPUT_FILENAME );
+    RubyConfig::init();
 
     cout << "Creating event queue..." << endl;
     g_eventQueue_ptr = new RubyEventQueue;