Igor Schein on Sat, 8 Jan 2000 00:37:34 -0500

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: zeta/ploth bug

On Fri, Jan 07, 2000 at 01:21:24PM +0100, Karim BELABAS wrote:
> [Igor:]
> > ? ploth(x=-5,-4.99,real(zeta(x*I+x^2+x^3)))
> > [-5.000000000000000000000000000, -4.990000000000000213162820728, 6.497774210233059296627777801 E79, 4.946657447140776084782559651 E80]
> > ?   ***   bug in GP (Segmentation Fault), please report
> >   ***   bug in GP (Segmentation Fault), please report
> > 
> > At this point the session is badly corrupted and has to be killed.
> An interesting bug. There was a buffer overflow when creating a label larger
> than 10^16 (for the bounding box). In fact, I tried the X-Windows version
> (default) and the worse things (infinite sequence of SIGBUS and SIGSEGV)
> happened in a forked process. So killing the original GP wasn't enough: I had
> to kill the underlying terminal...
> I changed the format specification so that only 5 significant digits are
> given. This is arbitrary, but since the precise coordinates are part of the
> return value, I don't think there's a need for higher precision there.

There're still problems after the patch:

? ploth(x=-1,1,imag(zeta(sin(x*I))));
? ploth(x=-2,2,imag(zeta(sin(x*I))));
^C  ***   user interrupt after -10 ms.

  ***   bug in GP (Segmentation Fault), please report
?   ***   user interrupt after 5,060 ms.

The first command outputs a window with a graph, but the session is
already corrupted, and interrupting the second command results in unusable
session, as before.




On a side note, I realized why ploth() didn't work for me before.  It
runs on a Solaris machine, but I physically sit at a SunOS machine
with OpenWindows.  For some reason, Solaris gnuplot doesn't display
under OpenWindows.  Go figure.