memory hole in egcs or ginac
Paul Grayson
pdg at mit.edu
Wed Aug 2 21:08:32 CEST 2000
The following program uses up all of my RAM in about 20 seconds:
------------------------------
#include <ginac/ginac.h>
using namespace GiNaC;
int main() {
while(1) symbol x("x");
}
------------------------------
...and here's how I compile it:
(using an fresh-out-of-the-box ./configure'd GiNaC)
------------------------------
capibara$ c++ -dumpversion
egcs-2.91.66
capibara$ c++ -dumpmachine
i386-slackware-linux
capibara$ c++ try.cc -lcln -lginac -o try
capibara$ try
[memory usage goes up and up...]
------------------------------
If I compile it with this line instead, I have no similar problem:
while(1) basic x = symbol("x");
...any ideas? Am I confused about C++ (likely), or do I just have an
old, buggy version of egcs, or is there a problem here?
Thanks
-Paul
More information about the GiNaC-devel
mailing list