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) > + getConstant(mb,_t).val.sval = GDKstrdup(val); > return pushArgument(mb, q, _t); > } > > > > ------------------------------------------------------------------------- > 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 > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/monetdb-checkins -- | Dr. Stefan Manegold | mailto:[EMAIL PROTECTED] | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 | ------------------------------------------------------------------------- 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-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-developers
