![](https://secure.gravatar.com/avatar/9b60bf117b0749e5bc94ebd0d2bc0004.jpg?s=120&d=mm&r=g)
On Mon, Oct 29, 2007 at 07:09:42AM +0000, Niels Nes wrote:
Update of /cvsroot/monetdb/MonetDB5/src/mal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18604/src/mal
Modified Files: Tag: MonetDB_5-2 mal_builder.mx Log Message: pushStr shouldn't do a GDKstrdup, as it may return an equal string from the constant cache, ie only if the returned variable holds the given string (poniters are equal) we do a string dup. This solves another memory leak.
Index: mal_builder.mx
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_builder.mx,v retrieving revision 1.26 retrieving revision 1.26.2.1 diff -u -d -r1.26 -r1.26.2.1 --- mal_builder.mx 28 Aug 2007 19:56:41 -0000 1.26 +++ mal_builder.mx 29 Oct 2007 07:09:40 -0000 1.26.2.1 @@ -260,10 +260,12 @@ ValRecord cst;
cst.vtype= TYPE_str;
- cst.val.sval= GDKstrdup(val);
- cst.val.sval= val;
gcc -DHAVE_CONFIG_H -I. -I/ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB5/src/mal -I../.. -I/ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB5/src/mal -I../optimizer -I/ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB5/src/mal/../optimizer -I../scheduler -I/ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB5/src/mal/../scheduler -I../modules/kernel -I/ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB5/src/mal/../modules/kernel -I/ufs/manegold/_/scratch0/Monet/Testing/Stable/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/include/MonetDB -I/ufs/manegold/_/scratch0/Monet/Testing/Stable/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/include/MonetDB/common -I/ufs/manegold/_/scratch0/Monet/Testing/Stable/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/include/MonetDB/gdk -DLIBMAL -Wall -Wextra -std=c99 -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2 -D_REENTRANT -c mal_builder.c -fPIC -DPIC -o .libs/libmal_la-mal_builder.o cc1: warnings being treated as errors /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB5/src/mal/mal_builder.mx: In function 'pushStr': /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB5/src/mal/mal_builder.mx:263: warning: assignment discards qualifiers from pointer target type make[5]: *** [libmal_la-mal_builder.lo] Error 1
Stefan
cst.len= strlen(cst.val.sval); _t = defConstant(mb,TYPE_str,&cst);
- if (getConstant(mb,_t).val.sval == val)
return pushArgument(mb, q, _t);getConstant(mb,_t).val.sval = GDKstrdup(val);
}
This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Monetdb-checkins mailing list Monetdb-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-checkins