Author: dcoakley
Date: 2011-08-11 00:44:44 -0400 (Thu, 11 Aug 2011)
New Revision: 3716

Modified:
   trunk/osprey/be/be/driver.cxx
Log:
Fix potential ErrMsg crash introduced in trunk commit r3709.

Make calls to Set_Error_Descriptor early in main(), since the error
descriptor must be initialized before calling ErrMsg in the backend.
Remove other calls to Set_Error_Descriptor which are now redundant.

Approved by: Sun Chan


Modified: trunk/osprey/be/be/driver.cxx
===================================================================
--- trunk/osprey/be/be/driver.cxx       2011-08-11 02:16:07 UTC (rev 3715)
+++ trunk/osprey/be/be/driver.cxx       2011-08-11 04:44:44 UTC (rev 3716)
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2008-2010 Advanced Micro Devices, Inc.  All Rights Reserved.
+ * Copyright (C) 2008-2011 Advanced Micro Devices, Inc.  All Rights Reserved.
  */
 
 /*
@@ -502,7 +502,6 @@
       Get_Phase_Args (PHASE_IPL, &phase_argc, &phase_argv);
       load_so ("ipl.so", Ipl_Path, Show_Progress);
       ipl_main (phase_argc, phase_argv);
-      Set_Error_Descriptor (EP_BE, EDESC_BE);
     }
 
     if (Run_lno || Run_autopar) {
@@ -2171,6 +2170,8 @@
   Set_Error_Line ( ERROR_LINE_UNKNOWN );
   Set_Error_File ( NULL );
   Set_Error_Phase ( "Back End Driver" );
+  Set_Error_Descriptor (EP_BE, EDESC_BE);
+  Set_Error_Descriptor (EP_CG, EDESC_CG);
 
   Preconfigure ();
   Process_Command_Line (argc, argv);
@@ -2318,12 +2319,6 @@
 
   Phase_Init ();
 
-  if (Run_preopt || Run_wopt || Run_lno || Run_Distr_Array || Run_autopar 
-       || Run_cg) {
-    Set_Error_Descriptor (EP_BE, EDESC_BE);
-    Set_Error_Descriptor (EP_CG, EDESC_CG);
-  }
-
   if (Tlog_File)
     Print_Tlog_Header(argc, argv);
 


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to