|
From: Ethan A M. <sf...@us...> - 2012-10-31 20:44:09
|
On Wednesday, October 31, 2012 01:06:12 pm Dima Kogan wrote: > > > > On Wednesday, October 31, 2012 08:33:01 am Karl-Friedrich Ratzsch > > wrote: > > > > > > i observe a strange parser error, where any command containing + or > > > - would no longer be accepted. It first occured to me after a > > > mistype with the stats commmand, and boils down to this: > > > > > > gp> a=0 > > > gp> stats file" > > > undefined variable: file > > > gp> a=a+1 > > > ^ > > > ';' expected > > On Wed, 31 Oct 2012 10:17:06 -0700 > > Ethan A Merritt <sf...@us...> wrote: > > Indeed quite strange. I see the same thing with 4.4.4 and with > > the current 4.6 CVS source. > > > > But it doesn't happen in 4.7, so bisecting the changes from > > 4.6 to 4.7 should identify the source of the problem and > > provide a fix. Dima Kogan wrote> > Git bisect says the fix happened in > > https://github.com/gnuplot/gnuplot/commit/9b944c2cd4c59545ce3cc903fdb88f01a8ca6e1e > This turns out to be a good example of when automatic bisection yields only a hint, not a fix. The commit you found (I found it also) did not actually remove the problem. It changed 2 call sites, one in stats.c and one in fit.c, such that try_to_get_string() was replaced with a call to string_or_express(). After this change the specific commands provided by Karl-Friedrich Ratzsch no longer trigger the error, but other calls to try_to_get_string() were still vulnerable. The underlying problem was a failure to reset internal parsing state variables after an error exit from command line parsing. Now fixed in CVS for 4.6 and 4.7. Ethan |