Ilya Zakharevich on Fri, 7 Jan 2000 11:46: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:
> 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.

I think there is a static function exactly for this purpose (sprintf9
or somesuch).  It will give the best precision possible.

Ilya