harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r532693 - in /harmony/enhanced/drlvm/trunk: src/test/regression/H1840/run.test.xml vm/jitrino/src/optimizer/FlowGraph.cpp
Date Thu, 26 Apr 2007 10:34:56 GMT
Author: varlax
Date: Thu Apr 26 03:34:52 2007
New Revision: 532693

URL: http://svn.apache.org/viewvc?view=rev&rev=532693
Log:
Applied HARMONY-1841 [drlvm][jit] Jitrino OPT crashes when returnAddress is on the top of
the stack before astore or astore_<n> instruction

Modified:
    harmony/enhanced/drlvm/trunk/src/test/regression/H1840/run.test.xml
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/FlowGraph.cpp

Modified: harmony/enhanced/drlvm/trunk/src/test/regression/H1840/run.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H1840/run.test.xml?view=diff&rev=532693&r1=532692&r2=532693
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H1840/run.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H1840/run.test.xml Thu Apr 26 03:34:52
2007
@@ -4,6 +4,10 @@
             test="org.apache.harmony.drlvm.tests.regression.h1840.SimplestTest"
             vmarg="-Xem:jet -XX:-vm.assert_dialog">
         </run-junit-test>
+        <run-junit-test
+            test="org.apache.harmony.drlvm.tests.regression.h1840.SimplestTest"
+            vmarg="-Xem:opt -XX:-vm.assert_dialog">
+        </run-junit-test>
     </target>
 </project>
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/FlowGraph.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/FlowGraph.cpp?view=diff&rev=532693&r1=532692&r2=532693
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/FlowGraph.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/FlowGraph.cpp Thu Apr 26 03:34:52
2007
@@ -537,17 +537,18 @@
             ++eiter;
             Node *node = edge->getSourceNode();
             Inst* last = (Inst*)node->getLastInst();
-            assert(last->isJSR());
-            last->unlink();
-            assert(node->getOutDegree() == 2);
-            Node* t1 = node->getOutEdges().front()->getTargetNode();
-            Node* t2 = node->getOutEdges().back()->getTargetNode();
-            if(t1 == entryJSR) {
-                fg.removeEdge(node, t2);
+            if (last->isJSR()) {
+	           last->unlink();
             }
-            else {
-                assert(t2 == entryJSR);
-                fg.removeEdge(node, t1);
+            if (node->getOutDegree() == 2) {
+	            Node* t1 = node->getOutEdges().front()->getTargetNode();
+	            Node* t2 = node->getOutEdges().back()->getTargetNode();
+	            if(t1 == entryJSR) {
+	                fg.removeEdge(node, t2);
+	            } else {
+	                assert(t2 == entryJSR);
+	                fg.removeEdge(node, t1);
+	            }
             }
         }
     } else if (entryJSR->hasOnlyOnePredEdge()) {



Mime
View raw message