Update of /cvsroot/monetdb/MonetDB5/src/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9889/src/mal

Modified Files:
        mal_instruction.mx 
Log Message:
fixed leak in newVariable

increased the buffer size used in instruction2str. This was the easy way out to 
fix a crash printing large programs. Afcourse a proper solution should be made
one day.


Index: mal_instruction.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_instruction.mx,v
retrieving revision 1.293
retrieving revision 1.294
diff -u -d -r1.293 -r1.294
--- mal_instruction.mx  2 Jan 2008 08:18:51 -0000       1.293
+++ mal_instruction.mx  4 Jan 2008 18:08:46 -0000       1.294
@@ -1392,7 +1392,8 @@
                }
        }
        n = mb->vtop;
-       getVar(mb, n) = (VarPtr) GDKzalloc(sizeof(VarRecord) + 2*MAXARG * 
sizeof(short));
+       if (getVar(mb, n) == NULL)
+               getVar(mb, n) = (VarPtr) GDKzalloc(sizeof(VarRecord) + 2*MAXARG 
* sizeof(short));
        mb->var[n]->name = name;
        mb->var[n]->propc = 0;
        mb->var[n]->maxprop = 2*MAXARG;
@@ -1539,7 +1540,7 @@
                return;
        if (v->name)
                GDKfree(v->name);
-       if (isVarConstant(mb,varid))
+       if (isVarConstant(mb,varid) || isVarDisabled(mb, varid))
                VALclear(&v->value);
        v->name = 0;
        v->type = 0;
@@ -2375,7 +2376,7 @@
        char nmebuf[PATHLENGTH];
        str pstring = 0;
 
-       len = 8196;
+       len = 64*1024;
        s = GDKmalloc(len);
        if (flg) {
                if( p->token<0){


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to