Author: dgilmore
Date: 2011-05-18 19:11:16 -0400 (Wed, 18 May 2011)
New Revision: 3610
Modified:
trunk/osprey/be/lno/fiz_fuse.cxx
trunk/osprey/be/lno/fiz_fuse.h
Log:
This patch fixes a "use before defined" problem exposed by building
gamess with -Ofast -apo -IPA:noinline, which can cause a segmentation
fault in the compiler during LNO.
The failure signature is that a segmentation fault occurs in
IPA_WN_MAP_Get() when Any_Loop_In_SNL_Parallelizable() is called
with a bad depth argument which was derived from an uninitialized
_depth field in an instance of class SNL_INFO.
Currently when FIZ_FUSE_INFO::Build() adds an element to the _sln_info
array (element type is SNL_INFO) in an instance of FIZ_FUSE_INFO, only
the _type field of the element was initialized. With this change all
of the elements are initialized.
Reviewed by Sun Chan.
Modified: trunk/osprey/be/lno/fiz_fuse.cxx
===================================================================
--- trunk/osprey/be/lno/fiz_fuse.cxx 2011-05-18 18:02:57 UTC (rev 3609)
+++ trunk/osprey/be/lno/fiz_fuse.cxx 2011-05-18 23:11:16 UTC (rev 3610)
@@ -262,11 +262,12 @@
}
}
-void FIZ_FUSE_INFO::Build(WN* root, BOOL all_loops) {
+void FIZ_FUSE_INFO::Build(WN* root, BOOL all_loops)
+{
WN2INT *loop_table=CXX_NEW(WN2INT(1024,_mpool),_mpool);
UINT snl_id=_snl_info.Newidx();
- _snl_info[snl_id]._type=Invalid;
+ _snl_info[snl_id].Init();
WN_ITER* wn_walker=WN_WALK_SCFIter(root);
while (WN_WALK_SCFNext(wn_walker)) {
Modified: trunk/osprey/be/lno/fiz_fuse.h
===================================================================
--- trunk/osprey/be/lno/fiz_fuse.h 2011-05-18 18:02:57 UTC (rev 3609)
+++ trunk/osprey/be/lno/fiz_fuse.h 2011-05-18 23:11:16 UTC (rev 3610)
@@ -64,7 +64,8 @@
SNL_TYPE _type;
public:
friend class FIZ_FUSE_INFO;
- SNL_INFO() { _depth=0; _wn=NULL; _type=Invalid; };
+ void Init(void) { _depth=0; _wn=NULL; _type=Invalid; };
+ SNL_INFO() { Init(); }
~SNL_INFO(){};
SNL_INFO(WN* wn);
};
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel