|
From: Ethan M. <merritt@u.washington.edu> - 2008-09-18 11:32:12
|
Bug #2117370 in essence complains that if you foolishly set too
small an axis tick increment, the number of ticks generated will
overwhelm your system. In the case provided, the program was
trying to generated > 10^9 labelled tick marks.
Can anyone see a problem with sanity-checking the values of
start, end, and increment in the "set {xyz}tic" command, and
refusing to draw more ticks than the resolution of the axis?
First cut at patch:
diff -ur gnuplot/src/axis.c gnuplot-cvs/src/axis.c
--- gnuplot/src/axis.c 2008-09-03 11:48:50.000000000 -0700
+++ gnuplot-cvs/src/axis.c 2008-09-18 11:13:18.000000000 -0700
@@ -1053,6 +1053,11 @@
return; /* just quietly ignore them ! */
/* }}} */
+ if ( (end-start)/step > term->xmax) {
+ int_warn(NO_CARET,"Too many axis ticks (>%.0g)", (end-start)/step);
+ return;
+ }
+
/* FIXME HBB 20010121: keeping adding 'step' to 'tic' is
* begging for rounding errors to strike us. */
/* HBB 20010410: ... and strike they did :-( */
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|