This simple program:
$ cat crash.c
#include "plplot.h"
int
main (int argc, char** argv)
{
plParseOpts(&argc, argv, PL_PARSE_FULL);
plsdev ("xfig");
plsfnam ("foo.fig");
plinit ();
plend ();
plsdev ("png");
plsfnam ("bar.png");
plinit ();
plend ();
}
crashes PLplot. It says:
$ ./crash -debug
plLoadDriver: Device not loaded!
plLoadDriver: tag=xfig, drvidx=11
plLoadDriver: Trying to load xfig on
/usr/lib/plplot5.2.0.cvs.20030219/data/../driversd/xfig
Opened foo.fig
Segmentation fault
It seems that this bug is related to a memory management problem in plend,
but I am not sure whether it has existed before I started changing the code.
If you have an old tree around, could you please test the program above?
--
Rafael
|