Author: zhuqing
Date: 2012-06-29 03:07:47 -0400 (Fri, 29 Jun 2012)
New Revision: 3953

Modified:
   trunk/osprey/wgen/wgen_expr.cxx
Log:
Fix bug954. Segmentation fault in Writing WHIRL file phase.
The fix is to add a condition at WN_set_rtype, make sure the whirl node is not 
null.

Author of this patch: xiao-jing zhang.
Approved by: Jian-xin


Modified: trunk/osprey/wgen/wgen_expr.cxx
===================================================================
--- trunk/osprey/wgen/wgen_expr.cxx     2012-06-27 06:46:38 UTC (rev 3952)
+++ trunk/osprey/wgen/wgen_expr.cxx     2012-06-29 07:07:47 UTC (rev 3953)
@@ -6508,8 +6508,10 @@
               WN *target_wn = WGEN_Address_Of(opnd0);
               WN *result_wn = WGEN_Expand_Expr (t, TRUE /* for return_in_mem*/,
                                                 0, 0, 0, 0, FALSE, FALSE, 
target_wn);
-              wn = result_wn;
-              WN_set_rtype(wn, MTYPE_V);
+              if (result_wn != NULL) {
+                wn = result_wn;
+                WN_set_rtype(wn, MTYPE_V);
+              }
               break;
             }
           }


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to