memory hole in egcs or ginac

Paul Grayson pdg at
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
capibara$ c++ -dumpmachine
capibara$ c++ -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?

More information about the GiNaC-devel mailing list