You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by mf...@apache.org on 2007/11/14 10:26:21 UTC
svn commit: r594808 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet:
compiler.cpp jframe.h
Author: mfursov
Date: Wed Nov 14 01:26:21 2007
New Revision: 594808
URL: http://svn.apache.org/viewvc?rev=594808&view=rev
Log:
Fix for HARMONY-5111 [drlvm][jit][jet] A memory leak in Jitrino.JET
Modified:
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jframe.h
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp?rev=594808&r1=594807&r2=594808&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp Wed Nov 14 01:26:21 2007
@@ -421,9 +421,6 @@
for (BBMAP::iterator i=m_bbs.begin(); i != m_bbs.end(); i++, c++) {
m_bbStates[i->first] = &allStates[c];
}
- m_bbStates[0]->jframe.init(m_infoBlock.get_stack_max(),
- m_infoBlock.get_num_locals());
-
// Generate the whole code - will recursively generate all the
// reachable code, except the exception handlers ...
comp_gen_code_bb(0);
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jframe.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jframe.h?rev=594808&r1=594807&r2=594808&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jframe.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jframe.h Wed Nov 14 01:26:21 2007
@@ -95,6 +95,8 @@
*/
void init(unsigned stack_max, unsigned var_slots)
{
+ assert(m_stack == NULL && m_vars == NULL);
+
max_stack = stack_max;
num_locals = var_slots;
m_stack = new Val[max_stack+1];