[GiNaC-devel] Re: [GiNaC-cvs] check parser_memleak.cpp

Alexei Sheplyakov varg at theor.jinr.ru
Wed Nov 21 07:33:35 CET 2007


Hi!

On Tue, Nov 20, 2007 at 11:19:50PM +0100, CVS Service wrote:
> Update of /home/cvs/GiNaC/check by vollinga
> 
> Added Files:
> 	parser_memleak.cpp 
> Log Message:
> Added small program that exhibits the memory leak in the ginac_yylex() [Sheplyakov].

The patch got slightly corrupted ("x2" is wrong, it should be "x^2", as
here: http://www.ginac.de/pipermail/ginac-devel/2007-November/001264.html).
Please apply this fix

diff --git a/check/parser_memleak.cpp b/check/parser_memleak.cpp
index ebc6ed9..f347ce9 100644
--- a/check/parser_memleak.cpp
+++ b/check/parser_memleak.cpp
@@ -18,7 +18,7 @@ int main(int argc, char** argv) {
        const symbol x("x"), y("y");
        const lst syms(x, y);
        // parser-generated symbol => memory leak.
-       static const char* str[] = { "x2+2*x*y + cos(x)", "Li2(x/y) + log(y/x)" };
+       static const char* str[] = { "x^2+2*x*y + cos(x)", "Li2(x/y) + log(y/x)" };
        
        // depends on the amount of the available VM, compiler options, etc.
        const unsigned N_max = 500000;


Best regards,
	Alexei

-- 
All science is either physics or stamp collecting.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-devel/attachments/20071121/66724cc2/attachment.pgp


More information about the GiNaC-devel mailing list